How do you document your PHP functions and classes inline?

Choose from:

  • Doxygen
  • phpDocumentator
  • Sami
  • ApiGen
  • CakePHP API docs
  • phpDox

See also the Wikipedia article, "Comparison of documentation generators", section "by Language".


PHPDoc, like what you've posted, is a widely accepted form of PHP documentation.

You can use Doxygen to auto-generate the docs.

Edit: In terms of generating in-line documentation in your code, I have never come across a tool that will go back and do this externally for a project. It's generally left in the realm of the IDE to generate a template while you code.

Eclipse actually does a decent job of this (it's one of the few things I like about Eclipse) and I believe Netbeans does as well. Any major IDE will likely have functionality to assist with this type of template generation.