ReflectionClass
PHP 手册

ReflectionClass::getDocComment

(PHP 5 >= 5.1.0)

ReflectionClass::getDocCommentGets doc comments

说明

public string ReflectionClass::getDocComment ( void )

Gets doc comments from a class.

Warning

本函数暂无文档,仅有参数列表。

参数

This function has no parameters.

返回值

The doc comment if it exists, otherwise FALSE

范例

Example #1 ReflectionClass::getDocComment example

<?php
/** 
* A test class
*
* @param  foo bar
* @return baz
*/
class TestClass { }

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

上例将输出:

string(55) "/** 
* A test class
*
* @param  foo bar
* @return baz
*/"

参见


ReflectionClass
PHP 手册