PHP debug_print_backtrace() 函数
PHP debug_print_backtrace() 函数打印 backtrace
函数原型
debug_print_backtrace()
返回值
没有返回值
直接输出 debug_print_backtrace() 函数代码生成的数据
范例
<?php function one($str1, $str2) { two("Glenn", "Quagmire"); } function two($str1, $str2) { three("Cleveland", "Brown"); } function three($str1, $str2) { debug_print_backtrace(); } one("Peter", "Griffin");
运行以上 PHP 脚本,输出结果如下
#0 three(Cleveland, Brown) called at [C:\webfolder\test.php:8] #1 two(Glenn, Quagmire) called at [C:\webfolder\test.php:4] #2 one(Peter, Griffin) called at [C:\webfolder\test.php:15]