On 31.05.2016 at 18:55, Fleshgrinder wrote:

> On 5/31/2016 6:39 PM, Dmitry Stogov wrote:
>>
>> $this is still confirm to variable syntax. It's just a special variable.
>> I think, we should keep lexical rules unchanged.
> 
> TL;DR $this does conform to syntax but not to basic PHP userland rules
> for variable naming (what the manual page is about).

I agree with Dmitry here.  While the page is about variables, the
paragraph is about variable names, and it is already noted there that:

| $this is a special variable that can't be assigned

In other sections of the manual, $this is described as
`pseudo-variable`.  However, it is still a variable, even though it
can't be assigned to – I think of it as read-only (final) variable.
Hence, it shouldn't be excluded from the valid variable names.

-- 
Christoph M. Becker


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to