Home > Backend Development > PHP Tutorial > PHP common document comments instructions_PHP tutorial

PHP common document comments instructions_PHP tutorial

WBOY
Release: 2016-07-20 11:16:09
Original
1040 people have browsed it

@access
Usage scope: class, function, var, define, module
This tag is used to indicate the access permission of the keyword: private, public or protected
@author
Specify the author
@copyright
Usage scope: class, function, var, define, module, use
Specify copyright information
@deprecated
Usage scope: class, function, var, define, module, constent, global, include
Indicate unused or obsolete keywords
@example
This tag is used to parse a piece of file content and highlight them. Phpdoc will try to read the file content from the file path given by this tag.
@const
Usage scope: define
Used to specify the constants defined in php
@final
Usage scope: class, function, var
Indicates that the keyword is a final class, method, or attribute, and is prohibited from being derived or modified.
@filesource
Similar to example, except that this tag will directly read the content of the currently parsed php file and display it.
@global
Indicates the global variables referenced in this function
@ingore
is used to ignore specified keywords in the document
@license
is equivalent to the html tag, first is the URL, then the content to be displayed
For example Baidu
You can write @license http://www.baidu.com Baidu
@link
Similar to license
But you can also point to any keyword in the document through link
@name
Specify an alias for the keyword.
@package
Usage scope: page level -> define, function, include
Class level -> class, var, methods
is used to logically group one or several keywords into a group.
@abstract
Indicates that the current class is an abstract class
@param
Indicate the parameters of a function
@return
Indicates the return pointer of a method or function
@static
Specifies that the Guan Jianzi is static.
@var
Indicate variable type
@version
Indicate version information
@todo
Indicate areas that should be improved or not implemented
@throws
Indicates the error exception that this function may throw and the circumstances in which it occurs.
As mentioned above, ordinary document tags must be marked with @ at the beginning of each line. In addition, there is also a tag called inline tag, represented by {@}, which includes the following:
{@link}
Usage is the same as @link
{@source}

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/440123.htmlTechArticle@access Scope of use: class, function, var, define, module This tag is used to indicate the access of keywords Permissions: private, public or protected @author Specify the author @copyright Scope of use: c...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template