$e = new \Exception;
var_dump($e->getTraceAsString());
function A()
{
echo 1;
$e = new \Exception;
var_dump($e->getTraceAsString());
}function B()
{
A();
}function C()
{
B();
}
C();
查看调用栈非常方便, 比debug_backtrace更具有可读性
$e = new \Exception;
var_dump($e->getTraceAsString());
function A()
{
echo 1;
$e = new \Exception;
var_dump($e->getTraceAsString());
}function B()
{
A();
}function C()
{
B();
}
C();
查看调用栈非常方便, 比debug_backtrace更具有可读性