📜  php 通过反射获取 docblock - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:31.237000             🧑  作者: Mango

代码示例1
class MyClass
{
public function __construct(
/** @var string */
public $a,
) {}
}
$property = new ReflectionProperty(MyClass::class, 'a');
$property->getDocComment(); // "/** @var string */"