PHP7 – Context Sensitive Lexer

In PHP7 Reserved Word Restrictions was loosen. There are currently 64 keywords reserved by PHP and some of them would be very useful as a method names to user side to define clear API.

Globally reserved words as property, constant, and method names within classes, interfaces, and traits are now allowed. This reduces the surface of BC breaks when new keywords are introduced and avoids naming restrictions on APIs.

This is a list of currently globally reserved words that will become semi-reserved which means we can use as property, constant, and method names within classes, interfaces, and traits.

The only limitation is that the class keyword still cannot be used as a constant name, otherwise it would conflict with the class name resolution syntax (ClassName::class).

That is it.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

Arjun
I am Arjun from Hyderabad (India). I have been working as a software engineer from last 7+ years, and its my passion to learn new things and implement them as a practice. Aside from work, I likes gardening and spending time with pets.
DMCA.com Protection Status