3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class X { /** * @annotation1 */ // Some comment public $x = "x", $y = 'y', /** @annotation2 */ $z = 'z' ; } $reflection = new ReflectionProperty('\X', 'x'); var_dump($reflection->getDocComment()); $reflection = new ReflectionProperty('\X', 'y'); var_dump($reflection->getDocComment());
based on 7ecQQ
Output for 5.3.18 - 7.2.0
string(31) "/** * @annotation1 */" bool(false)