3v4l.org

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