debug_print_backtrace()函數(shù)打印一條回溯。
void debug_print_backtrace ( void );
debug_print_backtrace() 打印了一條 PHP 回溯。它打印了函數(shù)調(diào)用、被 included/required 的文件和 eval() 的代碼。
| 序號 | 參數(shù)及說明 |
|---|---|
| 1 | void 無需參數(shù) |
沒有返回值。
以下是此debug_print_backtrace函數(shù)的用法-
<?php
function one() {
two();
}
function two() {
three();
}
function three(){
debug_print_backtrace();
}
one();
?>測試看看?/?這將產(chǎn)生以下結(jié)果-
#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]