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; echo $a;
Output for 5.2.0 - 7.1.0
Error: 4096 - Object of class A could not be converted to string, /in/mXfGS(10)
Output for 5.0.0 - 5.1.6
Object id #1
Output for 4.3.0 - 4.4.9
Object