SlideShare a Scribd company logo
phpDocGFM (06-11-09)PieterjanFiers
Formalstandard of PHP-codecommentingBasedonJavadocImprovedreadability of code commentsAuto-generatedocumentationCanbeinterpretedbyIDE’sEclipse, Zend Studio, Aptana, NetBeans..?phpDoc(umentor) ?
DocBlocksStarts with/**Eachnewline starts with*Endswith*/on a newline/** * This is a DocBlock */Precedes the element thatwillbedocumented
define() statements, functions, classes, class methods, and class vars, include() statements, and global variables/**  * DocBlock for function foo?  *  * No, this will be for the constant me!  */define('me',2); function foo($param = me) {}
Short descriptionsFirst line, endswith blank line (* ) orperiodMax 3 lines longLong descriptionsNo length limitCan have multiple paragraphsCan have HTML styletagsDocBlocks/** * Short description. * * Long description first sentence starts here * and continues on this line for a while* finally concluding here at the end of* this paragraph ** <p>The blank line above denotes a paragraph* break</p> * <p>Or P-tags</p> */
DocBlockmarkup-tags<b> emphasize/bold text<code>  Use this to surround php code, some 			    converters will highlight it<br>  hard line break, may be ignored by some 		    converters<i>  italicize/mark as important<kbd>  denote keyboard input/screen display<li>  list item<ol>  ordered list<p>  If used to enclose all paragraphs, otherwise 		    it will be considered text<pre>  Preserve line breaks and spacing, and 			    assume all tags are text (like XML's CDATA)<samp>  denote sample or examples (non-php)<ul>  unordered list<var>  denote a variable name
phpDocTags
phpDocTagshttp://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_tags.pkg.html
DocBlocks/** * Short classdescription. *  * @package[classPackage]*/ClassmyClass(){/*** property description *  * @var [vartype]*/$myvar = 0;/** * Methoddescription *  * @param [vartype]      $[long_varname] param-description * @param [long_vartype] $[varname] param-description *  * @return [vartype]*/ Public functiondoStuff($longvarname, $varname){    …}}
Document content of a fileOnlyDocBlocknot to precedean elementFirst in a fileMust have a @packageNextdefine, class, function must have itsownDocBlockPage level docBlocks<?php/** * Page-level DocBlock * @package pagepackage *//** * Define DocBlock */define(“FOO",“Bar");
A set of data, files, classes, functions,…Canbeviewed as one ‘product’SubPackagesrequire a packagePage- and class-levelvariantsClass and Page-leveldocBlocksalways have @packageIfnotsuppliedparserclass) willuseDefaultorinheritfromparent (extendedclass)Packages/*** Zend_Form_Element_Button* @packageZend_Form*@subpackageElement*/
ReducerepetitionStart with/**#@+End #@-*/Templates/**#@+  * @access private  * @var string  */var $_var1 = 'hello';var $_var2 = 'my';var $_var3 = 'name';var $_var4 = 'is';/** * Two words  */var $_var5 = 'like strings';/**#@-*/

More Related Content

PPTX
Majlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi Petang
PDF
Jerry Shea Resume And Addendum 5 2 09
PDF
Agapornis Mansos - www.criadourosudica.blogspot.com
PDF
MMBJ Shanzhai Culture
PDF
Washington Practitioners Significant Changes To Rpc 1.5
XLS
LoteríA Correcta
PPTX
Paulo Freire Pedagpogia 1
Majlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi Petang
Jerry Shea Resume And Addendum 5 2 09
Agapornis Mansos - www.criadourosudica.blogspot.com
MMBJ Shanzhai Culture
Washington Practitioners Significant Changes To Rpc 1.5
LoteríA Correcta
Paulo Freire Pedagpogia 1

What's hot (20)

PPT
Clean code _v2003
PPT
Week4142
 
PPTX
Interpreter Design Pattern
PDF
Better rspec 進擊的 RSpec
PPTX
Programming in C
DOCX
Free PHP Book Online | PHP Development in India
PPS
Commenting Best Practices
PDF
Ruby quick ref
PDF
Code Generation Cambridge 2013 Introduction to Parsing with ANTLR4
PPTX
03loop conditional statements
PPTX
Go Language Hands-on Workshop Material
PDF
Ruby cheat sheet
PPTX
Lesson 2 php data types
PPTX
Php training in chandigarh
PDF
Effective PHP. Part 6
PPT
Unit 5
PPT
Ruby Hell Yeah
PDF
Using Jenkins for Continuous Integration of Perl components OSD2011
PPTX
Php intro by sami kz
PPTX
C language updated
Clean code _v2003
Week4142
 
Interpreter Design Pattern
Better rspec 進擊的 RSpec
Programming in C
Free PHP Book Online | PHP Development in India
Commenting Best Practices
Ruby quick ref
Code Generation Cambridge 2013 Introduction to Parsing with ANTLR4
03loop conditional statements
Go Language Hands-on Workshop Material
Ruby cheat sheet
Lesson 2 php data types
Php training in chandigarh
Effective PHP. Part 6
Unit 5
Ruby Hell Yeah
Using Jenkins for Continuous Integration of Perl components OSD2011
Php intro by sami kz
C language updated
Ad

Similar to PHPDoc (20)

PPT
PHP Documentor
PPT
Php Docs
PDF
Php Documentor The Beauty And The Beast
KEY
20090629 Using phpDocumentor
PDF
The Beauty and the Beast
PPT
PDF
The Beauty And The Beast Php N W09
PPT
The Big Documentation Extravaganza
PPT
Php documentor
PDF
DocBlox: your source matters @ #pfc11
PDF
Inside DocBlox
PPTX
Day1
ODP
PHP Basics for Designers
DOCX
PHP Lesson
ODP
What's new, what's hot in PHP 5.3
PDF
The beautyandthebeast phpbat2010
PPT
PHP 5 Sucks. PHP 5 Rocks.
PHP Documentor
Php Docs
Php Documentor The Beauty And The Beast
20090629 Using phpDocumentor
The Beauty and the Beast
The Beauty And The Beast Php N W09
The Big Documentation Extravaganza
Php documentor
DocBlox: your source matters @ #pfc11
Inside DocBlox
Day1
PHP Basics for Designers
PHP Lesson
What's new, what's hot in PHP 5.3
The beautyandthebeast phpbat2010
PHP 5 Sucks. PHP 5 Rocks.
Ad

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPT
Teaching material agriculture food technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Modernizing your data center with Dell and AMD
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Understanding_Digital_Forensics_Presentation.pptx
NewMind AI Monthly Chronicles - July 2025
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Digital-Transformation-Roadmap-for-Companies.pptx
Teaching material agriculture food technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Modernizing your data center with Dell and AMD
Unlocking AI with Model Context Protocol (MCP)
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Advanced methodologies resolving dimensionality complications for autism neur...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Spectral efficient network and resource selection model in 5G networks
MYSQL Presentation for SQL database connectivity
Diabetes mellitus diagnosis method based random forest with bat algorithm
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Chapter 3 Spatial Domain Image Processing.pdf

PHPDoc