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

查看所有标签

Beautiful Code

Beautiful Code

Greg Wilson、Andy Oram / O'Reilly Media / 2007-7-6 / GBP 35.99

In this unique work, leading computer scientists discuss how they found unusual, carefully designed solutions to difficult problems. This book lets the reader look over the shoulder of major coding an......一起来看看 《Beautiful Code》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

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

RGB CMYK 互转工具