现在的位置: 首页 > 综合 > 正文

PHP restore_exception_handler() 函数

2013年11月22日 ⁄ 综合 ⁄ 共 471字 ⁄ 字号 评论关闭
文章目录

PHP restore_exception_handler() 函数

PHP Error 和 Logging 函数

定义和用法

restore_exception_handler() 函数恢复之前的异常处理程序,该程序是由 set_exception_handler() 函数改变的。

该函数永远返回 true。

语法

restore_exception_handler()

提示和注释

提示:之前的异常处理程序可能是在异常处理程序或用户自定义函数中构建的。

例子

<?php
restore_exception_handler();

throw new Exception('Uncaught Exception occured');
?>

输出:

Fatal error: Uncaught exception 'Exception' with message 
'Uncaught Exception occured' in C:\webfolder\test.php:4 
Stack trace: #0 {main} thrown in C:\webfolder\test.php on line 4

PHP Error 和 Logging 函数

抱歉!评论已关闭.