9 Steps to PHP Documentation Heaven
- Download PHPDocumentor and uncompress it into a directory inside your web root.
- Access the web interface by going to phpdoc.php in the newly extracted directory
- Enter the directory you would like to document
- Enter the directory the output should appear in (this needs to exist and be writable by the user your web server runs as)
- Choose a template! My favourite is the HandS one, but there are others and you can create your own later on
- Press the create button
- If your code wasn’t already documented correctly then there might not be a lot to see at this point. Go to the PHPDocumentor tutorial to find out how your commented code can become shiny documentation you can use
to blind your manager with scienceto empower knowledge-sharing within your team - Regenerate the documentation
- Get the rest of your team to comment their code correctly
Now repeat steps 8 and 9 many times until you have beautiful documentation.
I downloaded and installed PHPDocumentor sometime last year, but didn’t get very far with it due to lack of substantial project to give it a whirl on. Now I have a project, so thanks for the timely reminder!
dotjay – grab a new version and try out the web tool, I’ve been bogged down with getting PHPDocumentor working before but this was an absolute breeze.
Sorry for reviving an old thread.
I’m in the process of trying to transition from being a solo developer (with my own quite poor code commenting and documenting!) to working with other developers so need to be more disciplined and use better tools. I’m now using GIT and Bitbucket for version control but need to improve my documenting too. Is PHPDocumentor still the go-to app for documenting PHP code or are there better alternatives now in 2015?