Use something like phpdoc .
Basically you add special comments to your code:
function firstFunc($param1, $param2 = 'optional') {
static $staticvar = 7;
global $_myvar;
return $staticvar;
}
and it automatically creates HTML documentation for it.
Basically, the idea is to make life easier for the programmer and let you write documentation using the API without having to spend a lot of time on it.
There are several IDEs that also understand this and will show the documentation while you use it. For example, the function:
function isValid($value) {
....
}
Shows it in the Zend studio: http://static.zend.com/topics/code-assist.png
, IDE, ( , Zend, ), , , , , , , , .