Possible Duplicate:
Caller function in PHP 5?
Like this:
function foo(){
do_something();
}
function do_something(){
// How can I find out if this function was called from "foo" ?
}
Is this possible in PHP?
(Note that in my case the do_something()
function is actually a class method)