PHP 打印调用函数入口地址(堆栈)详解编程语言

PHP 打印调用函数入口地址(堆栈)


private function print_stack_trace()
{
$array = debug_backtrace();
//print_r($array);//信息很齐全
unset($array[0]);
foreach ($array as $row) {
$html .= $row['file'] . ':' . $row['line'] . '行,调用方法:' . $row['function'] . "<p>";
}
return $html;
}

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/19125.html

(0)
上一篇 2021年7月19日 21:44
下一篇 2021年7月19日 21:44

相关推荐

发表回复

登录后才能评论