News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Introduction to PhpDoc
January 10, 2012 @ 10:07:26

On PHPMaster.com today there's a new post from Moshe Teutsch about working with docblock comments in PHP scripts and how to use the phpDocumentor tool to generate the documentation from them.

If you've ever tried to read code written by someone other than yourself (who hasn't?), you know it can be a daunting task. [...] PhpDoc, short for PhpDocumentor, is a powerful tool that allows you to easily document your code via specially formatted comments. [...] By using PhpDoc, you can make it easy for others (and yourself) to understand your code - weeks, months, and even years after you've written it.

He introduces the concept of "docblocks" and includes several examples of how to comment things like packages, files, classes and functions/methods. Finally, he wraps up the post with an example of using the "phpdoc" command to run phpDocumentor and build the docs. In the comments, another tool is also suggested - DocBlox, a project that still parses the same docbloc syntax but does it in a much more memory efficient way (and is an actively maintained project).

0 comments voice your opinion now!
docbloc introduction phpdocumentor docblox comment phpdoc


blog comments powered by Disqus

Similar Posts

Maarten Balliauw's Blog: Writing for the Windows Azure for PHP portal

Joshua Eichorn\'s Blog: phpDocumentor 1.3.0RC4 is released

php|architect\'s ART: JSON and PHP - More Than Web Services

Gonzalo Ayuso's Blog: Inject dependencies via PhpDoc

Inside DealTaker Blog: Kohana PHP 2.3.x Tutorial Part 1


Community Events

Don't see your event here?
Let us know!


podcast api series wordpress release conference psr7 language opinion development laravel introduction laravel5 voicesoftheelephpant library unittest community framework interview extension

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework