3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { static $a=7; $b=9; } function f($obj) { var_export($obj); echo $obj::$a; } $a; f(new A);
Output for 5.4.0 - 5.4.22
Parse error: syntax error, unexpected '$b' (T_VARIABLE), expecting function (T_FUNCTION) in /in/mq6EC on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /in/mq6EC on line 6
Process exited with code 255.