Home > Backend Development > PHP Tutorial > php function comments

php function comments

WBOY
Release: 2016-08-08 09:19:28
Original
1309 people have browsed it

PHPDoc style comments

<code><?php
<span>/**
*<span> @name</span> 名字
*<span> @abstract</span> 申明变量/类/方法
*<span> @access</span> 指明这个变量、类、函数/方法的存取权限
*<span> @author</span> 函数作者的名字和邮箱地址
*<span> @category</span>  组织packages
*<span> @copyright</span> 指明版权信息
*<span> @const</span> 指明常量
*<span> @deprecate</span> 指明不推荐或者是废弃的信息MyEclipse编码设置
*<span> @example</span> 示例
*<span> @exclude</span> 指明当前的注释将不进行分析,不出现在文挡中
*<span> @final</span> 指明这是一个最终的类、方法、属性,禁止派生、修改。
*<span> @global</span> 指明在此函数中引用的全局变量
*<span> @include</span> 指明包含的文件的信息
*<span> @link</span> 定义在线连接
*<span> @module</span> 定义归属的模块信息
*<span> @modulegroup</span> 定义归属的模块组
*<span> @package</span> 定义归属的包的信息
*<span> @param</span> 定义函数或者方法的参数信息
*<span> @return</span> 定义函数或者方法的返回信息
*<span> @see</span> 定义需要参考的函数、变量,并加入相应的超级连接。
*<span> @since</span> 指明该api函数或者方法是从哪个版本开始引入的
*<span> @static</span> 指明变量、类、函数是静态的。
*<span> @throws</span> 指明此函数可能抛出的错误异常,极其发生的情况
*<span> @todo</span> 指明应该改进或没有实现的地方
*<span> @var</span> 定义说明变量/属性。
*<span> @version</span> 定义版本信息
*/</span>
function XXX($a){...}</code>
Copy after login

The above has introduced PHP function annotations, including relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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