3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function shutdown() { // This is our shutdown function, in // here we can do any last operations // before the script is complete. echo 'Script executed with success', PHP_EOL; } register_shutdown_function('shutdown'); class A {} chr(new A());
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.0.5, 5.3.0 - 7.1.0
Script executed with success
Output for 5.1.0 - 5.2.17
Notice: Object of class A could not be converted to int in /in/dPpnP on line 15 Script executed with success
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Script executed with success Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/dPpnP on line 9 PHP_EOL