Finally, being good developers, we need to create documentation for our code. phpDocumentor is an excellent open source project that helps us create professional-looking documentation based on code comments. We just need to format our comments in a certain way. phpDocumentor can be downloaded from the official site at http://www.phpdoc.org/.
We first need to add comments to our code. The official phpDocumentor site has a concise manual and tutorial to explain how to use phpDocumentor. We will briefly explain the required comment style necessary to build a bare-bones set of documentation.
phpDocumentor operates very similarly to Javadoc. It looks for comment blocks at specific locations. It takes these comment blocks and places them in HTML output. What exactly is documented is divided into three subjects — the page level documentation, the class documentation, and a small block before each function to describe what it does. In the page and class...