Re: getting a function name of the calling function
| From: | Brian Park | Date: | Thu, 02 May 2002 00:43:42 +0000 |
| Subject: | Re: getting a function name of the calling function | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95632@lists.php.net to get a copy of this message | ||
I don't know of a way to print out the function name. But for error
detection purposes, can you use __FILE__ and __LINE__ as alternatives? For
example:
echo "I am line" . __LINE__ . " at file " . __FILE__ . "\n";
Brian
"Joshua E Minnie" <josh@acsurf.net> wrote in message
news:20020501201523.38494.qmail@pb1.pair.com...
> I actually need it to print out the name of itself for error detection
> purposes.
>
> > > Does anybody know of any constants or predefined functions that will
> > > retrieve the calling functions name? For example:
> > >
> > > <?
> > > function new_func($somedata) {
> > > echo "I am function ".get_func_name();
> > > }
> > > ?>
>
> This example should print out:
> I am function new_func
>
> Is this possible?
>
>