3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } set_error_handler("exception_error_handler"); $arr = array(); try { $test = $arr['asd']; } catch(ErrorException $e) { echo 'exception; }
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected ''exception;' (T_ENCAPSED_AND_WHITESPACE) in /in/k2KJO on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in /in/k2KJO on line 10
Process exited with code 255.