PHP函数注释 [英] PHP Function Comments

查看:108
本文介绍了PHP函数注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是一个简单的问题:我看到一些PHP函数在顶部被注释,使用一个未知的格式:

Just a quick question: I've seen that some PHP functions are commented at the top, using a format that is unknown to me:

/**
 *
 * Convert an object to an array
 *
 * @param    object  $object The object to convert
 * @return      array
 *
 */



我的IDE为我提供了一个下拉选择例如@param和@return,所以它必须记录在某处。我尝试搜索google,但它不会在搜索中包含@符号。

My IDE gives me a dropdown selection for the things such as @param and @return, so it must be documented somewhere. I've tried searching google but it won't include the @ symbol in its search.

这是什么格式的评论,我可以在哪里找到一些信息?

What is this format of commenting and where can I find some information on it?

推荐答案

这是phpDoc语法。

That's phpDoc syntax.

href =http://www.phpdoc.org/ =nofollow noreferrer> phpDocumentor

Read more here: phpDocumentor

这篇关于PHP函数注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆