Re: RFC: C-sharp style property get/set syntax for PHP
| From: | Ángel González | Date: | Mon, 29 Nov 2010 20:43:16 +0000 |
| Subject: | Re: RFC: C-sharp style property get/set syntax for PHP | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-50707@lists.php.net to get a copy of this message | ||
Richard Quadling wrote:
> As for reading $seconds directly ...
>
> Well.
>
> If you think of the element that follows read as $this->xxxx, then if
> the parser can handle both ...
>
> read $seconds
> read getSeconds
>
> then yes for both.
>
> If not, then I'd guess that the getSeconds version should be the one
> we use as the value may not actually exist without some processing.
>
> Richard.
If it begins with $, it's a variable name, so map to that class member
variable. If it is instead a plain T_STRING, take that as a member call.
I'm not sure to be understanding the issue you're mentioning.