On 15/02/2020 17:44, Rowan Tommins wrote:
There is currently an odd inconsistency when using the decrement
operator on a null variable:
I'm not so sure...
That incrementing a null works at all is a painful part of the language
spec that I would argue needs flushing down the toilet, rather than
further reinforcing.
I recon the required precursor to doing so is erroring on undefined
variables, which I suspect accounts for about 99% of increment-on-nulls.
The majority are in favour (56%) but not the supermajority necessary -
Athough there's an argument to be made that a supermajority may exist in
a straight up or down vote rather than a 3-way
(https://wiki.php.net/rfc/engine_warnings).
So on one hand, consistency is good.
On the other hand, being consistently bad is still being bad.
--
Mark Randall
marand...@php.net
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php