PHP调试递归

时间:2019-04-15 07:31:12

标签: php

当我想为递归添加调试以向我发送回溯以显示在哪个文件中发生错误时遇到问题(由于代码在另一台服务器上,所以我无法调试)。

我尝试过:

register_shutdown_function(function(){
  // here i expect this function to be called and get the trace, but not
  die('error');
});

文档说该错误将被调用,但不会。

示例代码:

error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);

register_shutdown_function(function(){
    die('er');
});


function f()
{
    return f();
}

f();

还有其他方法可以调试致命错误并显示错误回溯吗?

0 个答案:

没有答案
相关问题