English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP Error & Loggings Reference Manual
The restore_exception_handler() function restores the previously defined exception handling function.
bool restore_exception_handler(void);
After changing the exception handler function with set_exception_handler(), you can use this function to restore to the previous exception handler (which can be a built-in function or a user-defined function).
Number | Parameters and Description |
---|---|
1 | void No parameters required |
This function always returns TRUE.
Example usage of restore_exception_handler() function:
<?php function exception_handler_1(Exception $e) { echo '[', __FUNCTION__, '] ', $e->getMessage(); } function exception_handler_2(Exception $e) { echo '[', __FUNCTION__, '] ', $e->getMessage(); } set_exception_handler('exception_handler_1); set_exception_handler('exception_handler_2); restore_exception_handler(); throw new Exception('This will trigger the first exception handler...'); ?>Test to see ‹/›
[exception_handler_1This will trigger the first exception handler...