Annotations in PHP: They Exist
2018-02-03T21:54:00+01:00About PHP
Annotations are more than PHPDoc comments. Annotations are a fully-featured way of including additional information alongside your code.
Annotations in PHP: They Exist from Rafael Dohms
PHP: rfc:annotations
Many languages currently support metadata information. This RFC exposes an
idea about how can it be implemented in PHP, providing a powerful tool that many
applications can take advantage of.
https://wiki.php.net/rfc/annotations
The Annotation Example
(Source: https://forum.nette.org/…odir-on-null#…)
<?php
/** @return*/
class TestClass
{
}
$rc = new ReflectionClass('TestClass');
var_dump($rc->getDocComment()); // string(13) "/** @return*/"