定义和用法restore_exception_handler() 函数恢复之前的异常处理程序。 该函数用于在通过 set_exception_handler() 函数改变后恢复之前的异常处理程序。 该函数总是返回 TRUE。 语法restore_exception_handler()
提示和注释提示:之前的异常处理程序可能是在内建的异常处理程序或用户自定义函数中构建的。 实例<?phprestore_exception_handler();throw new Exception('Uncaught Exception occured');?> 上面代码的输出如下所示: Fatal error: Uncaught exception 'Exception' with message'Uncaught Exception occured' in C:webfoldertest.php:4Stack trace: #0 {main} thrown in C:webfoldertest.php on line 4
下载地址: PHP restore_error_handler() 函数 PHP set_error_handler() 函数 |