Home php教程 php手册 PHP annotation specification_php basics

PHP annotation specification_php basics

May 16, 2016 am 09:00 AM
Annotation specifications

@access
Usage scope: class, function, var, define, module
This tag is used to specify the access permission of the keyword: private, public or protected
@author
Specify the author
@copyright
Usage scope: class, function, var, define, module, use
Indicate copyright information
@deprecated
Usage scope: class, function, var, define, module, constent, global, include
Indicates unused or obsolete keywords
@example
This tag is used to parse a section 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 indicate the constant of define in php
@final
Usage scope: class ,function,var
Indicates that the keyword is a final class, method, attribute, and prohibits derivation and modification.
@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 variable referenced in this function
@ingore
Used to ignore the specified keyword in the document
@license
Equivalent to , first the URL, then the content to be displayed
For example Baidu
can be written as @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
Used to logically divide one or several keywords into A group.
@abstrcut
Indicates that the current class is an abstract class
@param
Specifies the parameters of a function
@return
Specifies the return pointer of a method or function
@static Indicates that the keyword is static.
@var
Indicate the variable type
@version
Indicate version information
@todo
Indicate areas that should be improved or not implemented
@throws
Indicate that this function may Error exceptions thrown, extremely rare
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, using {@} Expressions include the following:
{@link}
Usage is the same as @link
{@source}
Display the content of a function or method

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)