3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public static $foo = null; } class Bar extends Foo { } Foo::$foo = 123; var_dump(Bar::$foo); Bar::$foo = 456; var_dump(Foo::$bar);
based on ZosNF
Output for 7.0.0 - 7.2.0
int(123) Fatal error: Uncaught Error: Access to undeclared static property: Foo::$bar in /in/skTGX:19 Stack trace: #0 {main} thrown in /in/skTGX on line 19
Process exited with code 255.
Output for 5.3.22 - 5.6.28
int(123) Fatal error: Access to undeclared static property: Foo::$bar in /in/skTGX on line 19
Process exited with code 255.