3v4l.org

run code in 300+ PHP versions simultaneously
<?php $error_handler = function() { throw new Exception(); } set_error_handler($error_handler, E_NOTICE | E_WARNING); if (false === preg_match('```', null)) { $error_handler(); } restore_error_handler();
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected 'set_error_handler' (T_STRING) in /in/9QEfc on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/9QEfc on line 7
Process exited with code 255.

preferences:
181.01 ms | 1399 KiB | 67 Q