<?php
set_exception_handler(function($e){
echo "exception handled"; // not echoed
});
register_shutdown_function(function(){
throw new Exception("test"); // this should be caught by the exception handler above, but it doesn't
});
Fatal error: Uncaught Exception: test in /in/Dv51A:7
Stack trace:
#0 [internal function]: {closure}()
#1 {main}
thrown in /in/Dv51A on line 7
Process exited with code 255.
Fatal error: Uncaught exception 'Exception' with message 'test' in /in/Dv51A:7
Stack trace:
#0 [internal function]: {closure}()
#1 {main}
thrown in /in/Dv51A on line 7
Process exited with code 255.
Output for 5.4.0 - 5.4.6
Fatal error: Uncaught exception 'Exception' with message 'test' in /in/Dv51A:7
Stack trace:
#0 [internal function]: {closure}()
#1 {main}
thrown in /in/Dv51A on line 7
Output for 5.3.0 - 5.3.5
Fatal error: Exception thrown without a stack frame in Unknown on line 0
Process exited with code 255.