3v4l.org

run code in 200+ PHP versions simultaneously
<?php class Foo { public const BAR = ''; public $bar; public function bar() {} } var_export((new ReflectionClass('Foo'))->getDocComment('foo'));
based on KWhno
Output for 7.1.0 - 7.4.0
Warning: ReflectionClass::getDocComment() expects exactly 0 parameters, 1 given in /in/D2Tm3 on line 11 NULL