3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T { /** * @Hello() */ private $x = 5; } class C { use T; /** * @Goodbye() */ private $x = 5; } $rt = new \ReflectionProperty('T', 'x'); $rc = new \ReflectionProperty('C', 'x'); var_dump($rt->getDocComment()); var_dump($rc->getDocComment());

preferences:
55.6 ms | 402 KiB | 5 Q