Php/func error debug print backtrace
来自菜鸟教程
PHP debug_print_backtrace()函数
例
打印PHP回溯:
<?php
function a($txt) {
b("Glenn");
}
function b($txt) {
c("Cleveland");
}
function c($txt) {
debug_print_backtrace();
}
a("Peter");
?>
定义和用法
debug_print_backtrace()函数显示PHP回溯。
此函数显示代码的数据,这些数据通向debug_print_backtrace()函数。
句法
debug_print_backtrace(options, limit);
参数值
| 参数 | 描述 |
|---|---|
| options | 可选的。为以下选项指定位掩码:DEBUG_BACKTRACE_IGNORE_ARGS(是否忽略“ args”索引以及所有函数/方法参数,以节省内存) |
| limit | 可选的。限制打印的堆栈帧数。默认情况下(limit = 0)它打印所有堆栈帧 |
技术细节
| 返回值: | None |
| PHP版本: | 5.0+ |
| PHP更新日志: | PHP 5.4:可选参数
limit
加入 |