You may use the @return tag to document the return value of functions or methods. @returns is an alias for @return to support autodoc designed for other packages
datatype should be a valid PHP type or "mixed." phpDocumentor will display the optional description unmodified
Here's an example:
/** * example of basic @return usage * @return mixed */ function function1($baz) { if ($baz) { $a = 5; } else { $a = array(1,4); } return $a; } class class1 { /** * example of documenting a method, and using optional description with @return * @return string de-html_entitied string (no entities at all) */ function bar($foo) { return strtr($foo,array_flip(get_html_translation_table(HTML_ENTITIES))); } } |
Prev | Home | Next |
@deprecated | Up | @var |
Tag Documentation written by Gregory Beaver <cellog@users.sourceforge.net>
Copyright © 2002, Gregory Beaver