PHP restore_exception_handler() 函數

定義和用法
restore_exception_handler() 函數恢復之前的異常處理程式。
該函數用於在通過 set_exception_handler() 函數改變後恢復之前的異常處理程式。
該函數總是返回 TRUE。
語法
restore_exception_handler()
提示和注釋
提示:之前的異常處理程式可能是在內建的異常處理程式或用戶自定義函數中構建的。
實例
<?php
restore_exception_handler();
throw new Exception('Uncaught Exception occured');
?>
restore_exception_handler();
throw new Exception('Uncaught Exception occured');
?>
上面代碼的輸出如下所示:
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
