3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Base { public static $prop = 'BASE'; } class Child extends Base { } $excepted = 'REFLECTED'; $property = new ReflectionProperty('Base', 'prop'); $property->setValue($excepted); $actual = Base::$prop; echo "Should be $excepted and is $actual\n"; $actual = Child::$prop; echo "Should be $excepted and is $actual\n";
based on i8Z1J
Output for 5.3.18 - 5.6.28, 7.0.1 - 7.2.0
Should be REFLECTED and is REFLECTED Should be REFLECTED and is REFLECTED
Output for 7.0.0
Should be REFLECTED and is REFLECTED Should be REFLECTED and is BASE