ReflectionClass::getDocComment

(PHP 5, PHP 7, PHP 8)

ReflectionClass::getDocComment获取文档注释

说明

publicReflectionClass::getDocComment(): string|false

从类中获取文档注释。文档注释以
class TestClass { }

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

以上示例会输出:

string(61) ""

参见

To Top