Re: Allow null variables to be decremented

From: Date: Sat, 15 Feb 2020 18:36:35 +0000
Subject: Re: Allow null variables to be decremented
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-108606@lists.php.net to get a copy of this message
On 15/02/2020 18:21, Mark Randall wrote:
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.
The problem then is, where do you stop? There are dozens of places where null values are coerced to the correct type, and changing them all would be a huge BC break. I think it would be perfectly fine to fix the current bug - that it's completely inconsistent in leaving the variable unchanged - even if we later decide to deprecate the whole thing. Regards, -- Rowan Tommins (né Collins) [IMSoP]

« previous php.internals (#108606) next »