On 14.09.2017 at 17:37, François Laupretre wrote:

> Le 14/09/2017 à 15:38, Alain Williams a écrit :
>
>> I vote for making it case sensitive: simpler for the parser; the
>> programmer
>> rapidly learns that it should be 'TRUE' and not 'true' -- job done.
> 
> No need to force people to switch their code to 'TRUE'. Just supporting
> case-sensitive 'TRUE', 'true', and 'True' (the same for false and null)
> should be enough. Not supporting 'tRUE' or 'TrUe' anymore will also be a
> positive side effect for code readability.

I'd rather not introduce a special case here.  All PHP keywords are
currently case-insensitive (CMIIW), so promoting true, false and null
from reserved words to keywords would solve this issue: all constants
are case-sensitive, all keywords are case-insensitive, the latter
obviously taking precedence.  And frankly, if somebody really prefers to
write "TruE", why bother?  This would still be far from having a chance
to win a "most obfuscated code contest".

-- 
Christoph M. Becker

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

Reply via email to