A PHPDocumentor Example

This page describes a simple documentation exercise using PhpMyadmin.


Problem Statement

Add PHPDoc comments to the program you wrote in the previous exercise and then run PhpDocumentor on it to generate the program documentation.

Download PhpDocumentor

To do this exercise you will need to download PhPDocumentor if you haven't already done so:

Sample Documentation

See the sample program for an example of how to use PHP Documentation.


Use the PhpDoc Tutorial to get up to speed on standards, conventions, tags, and other important information.


Run PhpDocumentor on your properly documented TwelveDays program:

  • Set the PhpDocumentor working directory (textfield) to the location of the twelvedays.php program.
  • Use the Files menu to designate the full path name of twelvedays.php.
  • Use the Output menu to designate the target directory where the documentation will be generated. A good choice would be <working-directory>>/phpdocs.
  • Use the Output menu to select the output template (or just the use the default HTML:Smarty:default).
  • Click the Create button to generate the output. If all goes well this should report Operation completed in the console text area.
  • View the generated documentation: http://localhost/phpdocs/.


Click here for example solution that includes twelvedays.php plus some other files.

Back to outline