3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class a { protected $installationDependent = true; public static function m() { return self::$installationDependent; } } class b extends a { protected $installationDependent = false; } var_dump(a::m()); var_dump(b::m());
based on DIrjG
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Access to undeclared static property: a::$installationDependent in /in/fEBCU:9 Stack trace: #0 /in/fEBCU(17): a::m() #1 {main} thrown in /in/fEBCU on line 9
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Fatal error: Access to undeclared static property: a::$installationDependent in /in/fEBCU on line 9
Process exited with code 255.