我尝试同时使用 register_shutdown
和 set_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/