4.5 Documentation Comments
Document comments describe PHP classes, constructors, methods, and fields (field). Each document comment is placed in the comment delimiter/**...*/, and a comment corresponds to a class or member. The comment should precede the declaration:
/**
* Description of some of this class ...
*/
Class Example {...
Note that the top-level (top-level) class is not indented, and its members are indented. The first line (/**) of the document comment describing the class does not need to be indented, and subsequent document comments indent each line by 1 cells (the asterisk is aligned vertically). Members, including constructors, indent the first line of their document comments by 4, and each line is then indented by 5 cells.
If you want to give information about a class, variable, or method that is not suitable for writing in a document, you can use implementation block annotations (see 5.1.1) or a single-line comment immediately following the declaration (see 5.1.2). For example, the details of a class implementation should be placed in the implementation block comments immediately following the class declaration, rather than in the document comments.
Document comments cannot be placed in a definition block of a method or constructor, because the program will associate the first declaration that is located after the document comment.
http://www.bkjia.com/PHPjc/532596.html www.bkjia.com true http://www.bkjia.com/PHPjc/532596.html techarticle 4.5 Documentation Comments Document comments describe PHP classes, constructors, methods, and fields (field). Each document comment is placed in the comment delimiter/**...*/, and a comment corresponds to a class ...