debug_backtrace() 函数生成 backtrace(回溯跟踪)。
该函数显示由 debug_backtrace() 函数代码生成的数据。
返回一个关联数组。可能返回的元素如下:
<?php function a($txt) { b("Glenn"); } function b($txt) { c("Cleveland"); } function c($txt) { var_dump(debug_backtrace()
); } a("Peter"); ?>
Array ( [0] => Array ( [file] => C:webfolder est.php [line] => 6 [function] => c [args] => Array ( [0] => Cleveland ) ) [1] => Array ( [file] => C:webfolder est.php [line] => 3 [function] => b [args] => Array ( [0] => Glenn ) ) [2] => Array ( [file] => C:webfolder est.php [line] => 11 [function] => a [args] => Array ( [0] => Peter ) ) )