O'Reilly logo

PHP 5 Power Programming by Derick Rethans, Stig Sæther Bakken, Andi Gutmans

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

B.2. Documentation Comments

The phpDocumentor tool generates documentation of the elements in your sources. The documentation is embedded in the source as comments. Nine distinct types of sections are understood by the tool: global variable, include, constant, function, define, class, variable, method, and page.

Every file inside your PHP project that you're going to process with phpDocumentor should start with a page level docblock, which documents certain aspects (like the author, package name, and so on) of this specific file. A docblock always starts with the sequence /**, unlike “normal” comments that usually start with only /*:

<?php
/**
 * Page level docblock
 * @author Derick Rethans <derick@php.net>
 * @package Examples
 */

After this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required