<?php
one();
function one() {
two();
}
function two() {
three();
}
function three() {
print_r( debug_backtrace() );
}
Array
(
[0] => Array
(
[file] => /usercode/file.php
[line] => 10
[function] => three
[args] => Array
(
)
)
[1] => Array
(
[file] => /usercode/file.php
[line] => 6
[function] => two
[args] => Array
(
)
)
[2] => Array
(
[file] => /usercode/file.php
[line] => 3
[function] => one
[args] => Array
(
)
)
)