PHP中的debug_print_backtrace()函数
PHP中的debug_print_backtrace()函数显示回溯。它不返回值。
语法
debug_print_backtrace(options, limit)
参数
options-以下给定选项的位掩码
DEBUG_BACKTRACE_IGNORE_ARGS:是否省略“args”索引以及所有函数/方法参数,以节省内存。
limit-限制打印的堆栈帧数。
返回
debug_print_backtrace()函数不返回值。
示例
以下是一个例子-
<?php
function Test1() {
Test2();
}
function Test2() {
Test3();
}
function Test3() {
Test4();
}
function Test4() {
debug_print_backtrace();
}
Test1();
?>输出结果
Hi: helloarray(1) {
[0]=>
array(4) {
["file"]=>
string(30) "/home/cg/root/4127336/main.php"
["line"]=>
int(7)
["function"]=>
string(7) "display"
["args"]=>
array(1) {
[0]=>
string(5)
"hello"
}
}
}热门推荐
10 儿子立冬祝福语简短独特
11 对当兵的祝福语简短
12 侄儿高考试祝福语简短
13 伴郎红包祝福语朋友简短
14 媳妇生日简短祝福语朋友
15 公司年会祝福语简短最好
16 元旦感恩祝福语简短大全
17 红包祝福语简短10字
18 周六早晨祝福语简短