Re: Test for edge cases with __get and property access flags
| From: | Alexey Zakhlestin | Date: | Thu, 04 Jun 2009 07:12:46 +0000 |
| Subject: | Re: Test for edge cases with __get and property access flags | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-44153@lists.php.net to get a copy of this message | ||
2009/6/4 Stan Vassilev <sv_forums@fmethod.com>
>
> 3. When the caller tries to retrieve $object->foo, and foo is a
> private/protected member the caller has no access to, instead of an error,
> __get is called.
>
> I'm not very sure the current behavior on item 3 is the best one (maybe
> error should be thrown regardless?), but freezing on either would be better
> than leaving it undefined :)
I always thought that this is the supposed behaviour. I believe I even
relied on it in one of my projects
--
Alexey Zakhlestin
http://www.milkfarmsoft.com/