PHP中的restore_error_handler()函数
restore_error_handling()函数可还原以前的错误处理程序。在使用set_error_handler()更改错误处理程序函数之后,将其用于恢复到先前的错误处理程序(可以是内置的或用户定义的函数)
语法
restore_error_handler()
参数
不适用
返回
restore_error_handler()函数返回TRUE。
示例
以下是一个例子-
<?php
function unserialize_handler($errno, $errstr) {
echo "Custom error: Invalid hello value.\n";
}
$hello = 'pqrs'; set_error_handler('unserialize_handler');
$original = unserialize($hello);
restore_error_handler();
?>输出结果
Custom error: Invalid hello value.
热门推荐
10 圣诞祝福语简短小学
11 祖国七十华诞简短祝福语
12 老师送的祝福语简短
13 生日祝福语大全女生简短
14 祝女性生日祝福语简短
15 牛年女神节祝福语简短
16 情人表白祝福语简短大气
17 老公开业祝福语简短
18 官宣新年祝福语简短