jjzjj

getDocComment

全部标签

反序列化后的 PHP Doc 注释

来自PHP(http://php.net/manual/en/class.reflectionmethod.php)的ReflectionMethod实例具有返回方法注释的getDocComment方法。这工作正常,除非您使用未序列化的对象。$ref=newReflectionClass('a');var_dump(method_exists($ref,'getDocComment'));//bool(true)var_dump($ref->getDocComment());//bool(false)$ref=unserialize(serialize($ref));var_dump(