How to get a function backtrace?
| From: | Stefan Rusterholz | Date: | Fri, 11 Jan 2002 09:34:38 +0000 |
| Subject: | How to get a function backtrace? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-80180@lists.php.net to get a copy of this message | ||
Im not sure if "function-backtrace" is the correct word for what I need, so I'll
explain:
If I have for example
<?
a();
function a(){
b();
}
function b(){
c();
}
function c(){
$x = function_backtrace();
print_r($x);
}
?>
then I want to get
array(
[0] => 'a',
[1] => 'b',
[2] => 'c'
)
or something similar. So I want to know, what functions have been called. If you know perl, then
adequate function was "caller".
I already searched php.net for it but had no luck for it - so if you please could point me to the
right direction I was very happy.
TIA
Stefan Rusterholz