Re: [PATCH] late binding for parent (and other options) - Was Re: [PHP-DEV] late static binding php6
| From: | m at digitalsandwich dot com | Date: | Mon, 26 Nov 2007 18:37:12 +0000 |
| Subject: | Re: [PATCH] late binding for parent (and other options) - Was Re: [PHP-DEV] late static binding php6 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33446@lists.php.net to get a copy of this message | ||
>> - static always points to the original callee, w/o being "broken" by
>> parent::
>> - get_called_class() should _not_ behave like shown above. It really was
>> not B that got called, but it was A, trough parent::
>> - a new get_static_class() method should return "B".
>
> Ouch. So now not only we have parent:: and Class:: behave differently
> (and I'm afraid to think of how call_user_func() should work) we also
> have two separate functions for getting called class and only one of
> them has non-functional notation. Yes, this is natural and intuitive. Not.
I don't think we need this, like you mentioned we have __CLASS__, we also
have get_class(). call_user_func() works fine in the patches...was a pita
:P but it works fine.
- Mike Lively