$this is still confirm to variable syntax. It's just a special variable.
I think, we should keep lexical rules unchanged.
From: Fleshgrinder <email@example.com
Sent: Tuesday, May 31, 2016 7:19:57 PM
To: Dmitry Stogov; internals; Nikita Popov
Subject: Re: [PHP-DEV] [RFC] Fix inconsistent behavior of $this variable
could you extend the RFC with an additional section that mentions to
update corresponding manual pages, e.g.:https://secure.php.net/language.variables.basics
There is a regular expression on that page that looks like the following
and is often referred to by people explaining variable names in PHP:
I would propose to update this to the following more complete PCRE:
@nikic this is also important for your RFC regarding empty variable
names because the PCRE would need to be updated once more too:
Of course the sentence preceding the regular expression would also
require an update.
There might be more pages that I am not aware of but we could ask
someone from the documentation team to help us here. The above one is
definitely the most important one and it should imho be included in the RFC.
Richard "Fleshgrinder" Fussenegger