PHP restore_exception_handler() 函数

PHP 教程 · 2019-01-24 15:44:03

定义和用法

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:webfoldertest.php:4
Stack trace: #0 {main} thrown in C:webfoldertest.php on line 4


点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

Single Page Web Applications

Single Page Web Applications

Michael Mikowski、Josh Powell / Manning Publications / 2013-9-30 / USD 44.99

Code for most web sites mostly runs on the server. When a user clicks on a link, the site reacts slowly because the browser sends information to the server and the server sends it back again before di......一起来看看 《Single Page Web Applications》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具