get calling function name

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

 



Greetings,

is there a way (i swear i saw it in the documentation at one point) to get the name of the calling scope (or function) from within another function?

eg.

function a() {
   b();
}

function b() {
   echo "the calling function is: " . func_caller();
}

a();

where this would print
the calling function is a
(i made func_caller() up)

I hope this is clear, and i hope there is a quick solution and i just can't find it in the documentation.

Thanks,
dk

[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