Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php get docblock with reflection

class MyClass
{
public function __construct(
/** @var string */
public $a,
) {}
}
$property = new ReflectionProperty(MyClass::class, 'a');
$property->getDocComment(); // "/** @var string */"
 
PREVIOUS NEXT
Tagged: #php #docblock #reflection
ADD COMMENT
Topic
Name
5+5 =