PHP debug_print_backtrace() 函数

转:http://www.w3school.com.cn/php/func_error_debug_print_backtrace.asp

定义和用法debug_print_backtrace() 函数输出 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");?>
输出:
#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]

    A+
发布日期:2016年03月08日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: