debug_print_backtrace()函数打印一条回溯。
void debug_print_backtrace ( void );
debug_print_backtrace() 打印了一条 PHP 回溯。它打印了函数调用、被 included/required 的文件和 eval() 的代码。
| 序号 | 参数及说明 |
|---|---|
| 1 | void 无需参数 |
没有返回值。
以下是此debug_print_backtrace函数的用法-
<?php
function one() {
two();
}
function two() {
three();
}
function three(){
debug_print_backtrace();
}
one();
?>测试看看‹/›这将产生以下结果-
#0 three() called at [/var/www/nhooo/php/test.php:7] #1 two() called at [/var/www/nhooo/php/test.php:3] #2 one() called at [/var/www/nhooo/php/test.php:13]