Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108604 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 73744 invoked from network); 15 Feb 2020 20:07:04 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 15 Feb 2020 20:07:04 -0000 To: internals@lists.php.net References: <16481aca-93f4-43f5-5ec2-413d19ade318@gmail.com> Date: Sat, 15 Feb 2020 18:21:56 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <16481aca-93f4-43f5-5ec2-413d19ade318@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Posted-By: 94.8.9.87 Subject: Re: Allow null variables to be decremented From: marandall@php.net (Mark Randall) Message-ID: 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 marandall@php.net