3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php Class Foo { private static $bar = "bar"; } Foo::$bar = "foo"; echo Foo::$bar;
based on 5AIXH
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Cannot access private property Foo::$bar in /in/GmND3:7 Stack trace: #0 {main} thrown in /in/GmND3 on line 7
Process exited with code 255.
Output for 5.3.22 - 5.6.28
Fatal error: Cannot access private property Foo::$bar in /in/GmND3 on line 7
Process exited with code 255.