phpDocumentor

(( gitHubWatchers )) (( gitHubStars )) (( gitHubForks ))

phpDocumentor analyzes your code to create great documentation. It enables you to generate documentation directly from your PHP source code.

This documentation provides an in-depth view of your project to you, your consumers and contributors.

Installation

Install from a Composer package as a dev dependency (with Composer)

Make sure you have Composer and all dependencies ext/intl, ext/zip, ext/xsl, graphviz installed.

Require it as a dev dependency:
composer require --dev phpdocumentor/phpdocumentor
Run it:
php vendor/bin/phpdoc

Install from a Composer package as a global CLI utility (with Composer)

Make sure you have Composer and all dependencies ext/intl, ext/zip, ext/xsl, graphviz installed.

Require it as a global CLI utility:
composer global require phpdocumentor/phpdocumentor
Run it:
phpdoc
Make sure your global vendor binaries directory is in your $PATH environment variable. Check the Composer documentation for more information.

Install from a PHP Archive (with curl or wget)

The PHPUnit documentation has a clear manual on how to install PHARs on Windows.

If you have the Suhosin extension enabled, make sure to allow the execution of PHARs in your php.ini:
suhosin.executor.include.whitelist = phar

Make sure all dependencies are installed: ext/intl, ext/zip, ext/xsl, graphviz.

Locally

Download it:
wget -O phpDocumentor.phar https://github.com/phpDocumentor/phpDocumentor2/releases/download/RELEASE/phpDocumentor.phar
or
curl -sSL https://github.com/phpDocumentor/phpDocumentor2/releases/download/RELEASE/phpDocumentor.phar -o phpDocumentor.phar
Use it:
php phpDocumentor.phar

Globally

Download it:
wget -O phpDocumentor.phar https://github.com/phpDocumentor/phpDocumentor2/releases/download/RELEASE/phpDocumentor.phar
or
curl -sSL https://github.com/phpDocumentor/phpDocumentor2/releases/download/RELEASE/phpDocumentor.phar -o phpDocumentor.phar
Install it as an executable:
chmod a+x phpDocumentor.phar
sudo mv phpDocumentor.phar /usr/local/bin/phpDocumentor
Use it:
phpDocumentor