Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108667 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 81827 invoked from network); 19 Feb 2020 16:43:37 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Feb 2020 16:43:37 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2D3D1180210 for ; Wed, 19 Feb 2020 06:59:33 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS1836 195.49.0.0/17 X-Spam-Virus: No X-Envelope-From: Received: from darkcity.gna.ch (darkcity.gna.ch [195.49.47.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 19 Feb 2020 06:59:32 -0800 (PST) Received: from [IPv6:2001:918:ff83:102:1cd7:9fcd:de6b:a2e8] (unknown [IPv6:2001:918:ff83::7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id 94E496C1528; Wed, 19 Feb 2020 15:59:24 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) In-Reply-To: <2444450.8GC8745SYh@mcmic-probook> Date: Wed, 19 Feb 2020 15:59:24 +0100 Cc: php internals Content-Transfer-Encoding: quoted-printable Message-ID: <497658C4-4799-47DE-A7C7-11C1B742F9E3@cschneid.com> References: <16481aca-93f4-43f5-5ec2-413d19ade318@gmail.com> <660551dc-4527-5f6e-1f05-e167931cd9f1@gmail.com> <2444450.8GC8745SYh@mcmic-probook> To: =?utf-8?Q?C=C3=B4me_Chilliet?= X-Mailer: Apple Mail (2.3608.60.0.2.5) Subject: Re: [PHP-DEV] Allow null variables to be decremented From: cschneid@cschneid.com (Christian Schneider) Am 19.02.2020 um 15:52 schrieb C=C3=B4me Chilliet = : > Le mardi 18 f=C3=A9vrier 2020, 20:27:37 CET Rowan Tommins a =C3=A9crit = : >> With booleans, there is at least a consistency between those two=20 >> operators, even though it's consistently weird. There's definitely a=20= >> strong case for making them match +=3D1 and -=3D1 though. >=20 > Is there any reason the engine is not running the same code or even = compiling to the same opcodes $a++ and $a+=3D1? > If it should never differ, why is it not the same operation? $a++ is magic, see example #1 at = https://www.php.net/manual/en/language.operators.increment.php=20 And no, this should not be changed as it would be a major BC. - Chris