3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { /** * @annotation1 */ // Some comment public $x = "...", $y = '...'; } $reflection = new ReflectionProperty('\X', 'x'); var_dump($reflection->getDocComment()); $reflection = new ReflectionProperty('\X', 'y'); var_dump($reflection->getDocComment());

preferences:
41.56 ms | 402 KiB | 5 Q