首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

ReflectionClass::getDocComment

(PHP 5 >= 5.1.0, PHP 7)

ReflectionClass::getDocComment - 获取文档评论

描述

代码语言:javascript
复制
public string ReflectionClass::getDocComment ( void )

从一个类获取文档评论。

警告

此函数目前没有记录;只有它的参数列表可用。

参数

该函数没有参数。

返回值

文档评论如果存在,否则 FALSE

例子

示例#1 ReflectionClass::getDocComment()示例

代码语言:javascript
复制
<?php
/**?
*?A?test?class
*
*?@param??foo?bar
*?@return?baz
*/
class?TestClass?{?}

$rc?=?new?ReflectionClass('TestClass');
var_dump($rc->getDocComment())
?>

上面的例子将输出:

代码语言:javascript
复制
string(55) "/** 
* A test class
*
* @param  foo bar
* @return baz
*/"

另请参阅

  • ReflectionClass::getName() - 获取类名

← ReflectionClass::getDefaultProperties

ReflectionClass::getEndLine →

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com