Re: Function Name available within function?
| From: | Joe Penn | Date: | Fri, 25 Jul 2003 01:25:44 +0000 |
| Subject: | Re: Function Name available within function? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-29467@lists.php.net to get a copy of this message | ||
Yes - __FUNCTION__ would hold ( string )[function name]
"Peter Beckman" <beckman@purplecow.com> wrote in message
news:20030724181222.N32943@thermonuclear.org...
> Is there some sort of master variable which will tell you which function
> you are currently in?
>
> Like __FUNCTION__ like there is for __FILE__ and __LINE__... Something
like
> that. Even a function that does that?
>
> I am writing a program in which several functions refer back to themselves
> by name, and it'd be nice to be able to do it dynamically. If I change a
> function name, then I have to change (currently) the string that contains
> the function name within that function.
>
> Peter
> --------------------------------------------------------------------------
-
> Peter Beckman Internet
Guy
> beckman@purplecow.com
http://www.purplecow.com/
> --------------------------------------------------------------------------
-