Private member/method access inconsistency
| From: | Andrei Zmievski | Date: | Tue, 06 Jan 2009 22:18:21 +0000 |
| Subject: | Private member/method access inconsistency | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-42518@lists.php.net to get a copy of this message | ||
A colleague at Digg pointed me to this blog entry:
http://atomized.org/2008/11/more-tough-love-from-php/
To me it looks like a large inconsistency in the way we invoke overloaded handlers for
members vs. methods. I am not sure how it came to be this way, but it's probably something
we should fix. We can either remove the call to __get() on private member access, or add
call to __call() on private method invocation. The former approach presents more of a BC
problem IMHO, so I am advocating the latter. I've attached a simple patch for consideration.
-Andrei