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 金店立秋祝福语简短英文
18 婆婆高寿祝福语大全简短