Re: [VOTE] Property Accessors for 5.5

From: Date: Sun, 20 Jan 2013 13:45:54 +0000
Subject: Re: [VOTE] Property Accessors for 5.5
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-65038@lists.php.net to get a copy of this message
On Sun, 20 Jan 2013 14:35:14 +0100, Sherif Ramadan <theanomaly.is@gmail.com> wrote:
What I'm saying is this kind of behavior needs far more serious reasoning than the very naive assesment you're making above. I mean that with all due respect. Just wondering if there is another take on this from anyone else?
I think the current behavior is most appropriate one for var_dump() (and array casts/get_object_vars()). It's the same behavior as if you had manually defined getXXX() methods or used __get(). If you start marking function calls, you get new problems like handling getters that throw exceptions or have side effects ("the code behaves differently when add a var_dump()?!"). -- Gustavo Lopes

« previous php.internals (#65038) next »