debug_backtrace()
函数生成 backtrace(回溯跟踪);
z/z/zz/a.php
1
2
3
4
5
6
|
class
a{
function
__construct()
{
print_r(debug_backtrace());
}
}
|
这样调用时
1
2
|
include
'z/z/zz/a.php'
;
new
a();
|
有
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
Array
(
[0] => Array
(
[file] => D:\AMP\web\ide_tmp.php
[line] => 4
[function] => __construct
[class] => a
[object] => a Object
(
)
[type] => ->
[args] => Array
(
)
)
)
|