Support for keywords where possible

From: Date: Wed, 11 Sep 2013 21:21:05 +0000
Subject: Support for keywords where possible
Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi!

I tried to widen the naming possibilities by allowing to use keywords as identifiers (for function
names, class names, label (goto) names, ...) where possible. It doesn't break any BC.

Furthermore when BC needs to be broken in future for new keywords, it will have a smaller impact as
most usages of the new keyword then still work.

It also prevents unnecessary workarounds like in https://wiki.php.net/rfc/named_params#syntax.
There, to address a function with a parameter called $array, we could simply write func(array =>
$value); instead of the until now necessary func("array" => value);

You can find the patch here:
https://github.com/php/php-src/pull/438

Any thoughts about this?

Bob Weinand



Thread (40 messages)

« previous php.internals (#69068) next »