3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class ReflectMe { /** * Eine nette Variable * * @var bool */ private $var = true; } $reflectionClass = new ReflectionClass((new ReflectMe())); var_dump($reflectionClass); var_dump($reflectionClass->getProperty('var')->getDocComment());
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0beta1
object(ReflectionClass)#1 (1) { ["name"]=> string(9) "ReflectMe" } string(62) "/** * Eine nette Variable * * @var bool */"
Output for hhvm-3.18.5 - 3.22.0
object(ReflectionClass)#1 (2) { ["name"]=> string(9) "ReflectMe" ["obj":"ReflectionClass":private]=> object(ReflectMe)#2 (1) { ["var":"ReflectMe":private]=> bool(true) } } string(62) "/** * Eine nette Variable * * @var bool */"