determining caller of function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is there a way, *other than using debug_backtrace(), which has a bug*, to determine from inside what class and method the current function was called? For example:

class Foo {
function fubar() {
// I want to be able to determine that the function from which this
// method was called in this example is the "go" method of the class "Bar".
}
}
class Bar{
function go() {
$f = new Foo();
$f->fubar();
}
}
$b = new Bar();
$b->go();


--
Thanks,
- Thomas

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux