Re: Test for edge cases with __get and property access flags
| From: | Eddie Drapkin | Date: | Fri, 05 Jun 2009 13:07:09 +0000 |
| Subject: | Re: Test for edge cases with __get and property access flags | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-44178@lists.php.net to get a copy of this message | ||
I thought this was the expected behaviour as well and I am quite sure that
I've used it in an experiment (all class members private and _get() output
escapes them) that failed pretty miserably. But I did think this was the
expected behavior. Perhaps it ought to throw an E_STRICT?
On Fri, Jun 5, 2009 at 8:58 AM, Stan Vassilev <sv_forums@fmethod.com> wrote:
>
>
> 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
>
>
> Hi,
>
> If the community wants it like it is, then I'm just fine with that: as long
> as the test is committed, so that it doesn't change overnight. Any
> volunteers :)?
>
> Regards,
> Stan Vassilev