Re: looking for function (pre 4.3.x)
| From: | Justin French | Date: | Sat, 24 May 2003 12:09:40 +0000 |
| Subject: | Re: looking for function (pre 4.3.x) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148827@lists.php.net to get a copy of this message | ||
not sure about the name of the calling function, but there is
$_SERVER['PHP_SELF'] for the called file (ie not the included file.
there are the constants __FILE__ and (i think) __LINE__ also
what are you trying to write? looks to me like some error handling type
stuff.
look at the example on the custom error handling page:
http://au.php.net/manual/en/ref.errorfunc.php
and trigger_error():
http://au.php.net/manual/en/function.trigger-error.php
on 24/05/03 5:21 PM, Carl P. Corliss (rabbitt@xaraya.com) 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?
>
> TIA :)
>
> cheers,