Re: PHP5: expected __METHOD__ behavior
| From: | Johannes Schlueter | Date: | Sat, 22 May 2004 08:40:47 +0000 |
| Subject: | Re: PHP5: expected __METHOD__ behavior | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-10022@lists.php.net to get a copy of this message | ||
Hi,
Andrey Hristov wrote:
> echo get_class($this).'::'.__FUNCTION__ (when there is an instance of the
> class) but AFAIK in your case with static calls there is no solution.
Is there some way to add a function (or some other magic thing) that works
with static calls and call it a bug fix, so it can be in 5.0? If not: Is
there a way to implement it and add it as a new feature with PHP5.1?
Lately I needed such a thing while building some kind of framework. I solved
it by adding a function to my extended class which passes it's __CLASS__ as
an additional paramter to my base function - I don't really like it that
way ;-)
johannes