3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } set_error_handler('test_error_handler'); class A {} $a = new A; var_dump((str)$a);
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '$a' (T_VARIABLE) in /in/32WGp on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/32WGp on line 10
Process exited with code 255.