PHP restore_exception_handler()Function
Complete PHP Error Reference Manual
Definition and Usage
The restore_exception_handler() function restores the previous exception handler.
This function is used to restore the previous exception handler after it has been changed by the set_exception_handler() function.
This function always returns TRUE.
Syntax
restore_exception_handler()
Tips and Notes
Tip:The previous exception handler may be the built-in exception handler or a user-defined function.
Examples
<?php
restore_exception_handler();
throw new Exception('Uncaught Exception occured');
?>
restore_exception_handler();
throw new Exception('Uncaught Exception occured');
?>
The output of the above code is shown below:
Fatal error: Uncaught exception 'Exception' with message
'Uncaught Exception occured' in C:webfoldertest.php:4
Stack trace: #0 {main} thrown in C:webfoldertest.php on line 4
'Uncaught Exception occured' in C:webfoldertest.php:4
Stack trace: #0 {main} thrown in C:webfoldertest.php on line 4
Complete PHP Error Reference Manual Other Extensions