Re: get calling function name
| From: | Daniel Kolbo | Date: | Tue, 09 Dec 2008 20:49:11 +0000 |
| Subject: | Re: get calling function name | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-284382@lists.php.net to get a copy of this message | ||
Stut wrote:
On 9 Dec 2008, at 19:37, Daniel Kolbo wrote:that'll do the trick. thanks, dKis 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.http://php.net/debug_backtrace -Stut Stut,