3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public static function me() { echo static::$b; } } class B extends A { private static $b = "hello"; } B::me();
based on urthA
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Cannot access private property B::$b in /in/pgp3v:5 Stack trace: #0 /in/pgp3v(13): A::me() #1 {main} thrown in /in/pgp3v on line 5
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Fatal error: Cannot access private property B::$b in /in/pgp3v on line 5
Process exited with code 255.