3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Concrete5_Problems_Handler { private static $handled = false; public static handleException($e) { if(self::$handled) { return; } self::$handled = true; echo "\n######### " . __FUNCTION__ . "() called #########\n"; } public static handleShutdown($e) { if(self::$handled) { return; } self::$handled = true; echo "\n######### " . __FUNCTION__ . "() called #########\n"; } } set_exception_handler('Concrete5_Problems_Handler::handleException'); register_shutdown_function('Concrete5_Problems_Handler::handleShutdown'); throw new Exception('x');
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected 'handleException' (T_STRING), expecting variable (T_VARIABLE) in /in/MYO28 on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/MYO28 on line 5
Process exited with code 255.

preferences:
200.37 ms | 1395 KiB | 62 Q