3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); ini_set('display_errors', 0); var_dump(ini_get('display_errors')); var_dump(ini_get('error_reporting')); //set_error_handler('custHandler'); register_shutdown_function('shutdownHandler'); echo $meow['llama']; function custHandler($errno, $errstr, $errfile, $errline, $errcontext) { echo "Custom handler called."; } function shutdownHandler() { echo "I died."; var_dump(error_get_last()); } $data = ''; while(true) { $data .= str_repeat('#', PHP_INT_MAX); }
Output for 5.4.0 - 5.4.31
string(1) "0" string(5) "32767" I died.array(4) { ["type"]=> int(1) ["message"]=> string(93) "Allowed memory size of 67108864 bytes exhausted (tried to allocate 9223372036854775808 bytes)" ["file"]=> string(9) "/in/q4s6R" ["line"]=> int(27) }
Process exited with code 255.
Output for 5.3.0 - 5.3.28
string(1) "0" string(5) "30719" I died.array(4) { ["type"]=> int(1) ["message"]=> string(93) "Allowed memory size of 67108864 bytes exhausted (tried to allocate 9223372036854775808 bytes)" ["file"]=> string(9) "/in/q4s6R" ["line"]=> int(27) }
Process exited with code 255.