Re: looking for function (pre 4.3.x)
| From: | David Otton | Date: | Sat, 24 May 2003 13:32:31 +0000 |
| Subject: | Re: looking for function (pre 4.3.x) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148830@lists.php.net to get a copy of this message | ||
On Sat, 24 May 2003 00:21:29 -0600, you wrote:
>Is there a known function that will give you the name of the calling function,
>something like this:
>
>$callee = who_the_heck_called_me();
>
>where $callee would then be an array with the following indices:
>
>calling_function
>calling_file
>calling_line
>
>or, if not, does anyone have any idea how to go about creating this?
Hmm... error handling?
You could explore debug_backtrace(), I suppose. But that's 4.3 and above.
Anything else would probably require modifying PHP itself... while that's
possible, upgrading would be less work.