php - 如何使用自定义错误处理程序捕获 php E_PARSE 错误?

标签 php exception

我尝试同时使用 register_shutdownset_error_handler 但没有成功。有人知道这个问题的另一种解决方案吗?

最佳答案

这是文档的片段

The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called.

E_PARSE 立即停止执行,因此它将无法调用任何其他函数

关于php - 如何使用自定义错误处理程序捕获 php E_PARSE 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18569978/

相关文章:

javascript - 允许用户使用图像和文本编写动态博客页面

C# 动态函数 AmbigiousMatchException?

c# - 识别损坏状态异常的更好方法

php - SOAP 错误 : Parsing WSDL: Couldn't load from 'website ' failed to load external entity

php - 扩展 Drupal

php - Codeigniter set_checkbox() 保持选中状态

php - 如何显示 Woocommerce 类别描述

android - fatal error - 空指针异常

exception - JavaFX 和外部 JAR

c# - 有没有办法将 "throw new Exception()"压缩到一个对象中?