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 好听的元旦简短祝福语