3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { private static $x = 1; } class B extends A { function bar() { var_dump(self::$x); } }; $a = new B; $a->bar();
based on 4XheY
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Cannot access property B::$x in /in/lU8hO:9 Stack trace: #0 /in/lU8hO(14): B->bar() #1 {main} thrown in /in/lU8hO on line 9
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Cannot access property B::$x in /in/lU8hO on line 9
Process exited with code 255.