Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108668 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 83921 invoked from network); 19 Feb 2020 16:49:30 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Feb 2020 16:49:30 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 346641804DA for ; Wed, 19 Feb 2020 07:05:26 -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_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS12876 195.154.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from smtp.opensides.be (smtp.opensides.be [195.154.20.141]) by php-smtp4.php.net (Postfix) with ESMTP for ; Wed, 19 Feb 2020 07:05:25 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by smtp.opensides.be (Postfix) with ESMTP id 5CE5549E970 for ; Wed, 19 Feb 2020 16:05:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at opensides.be Received: from smtp.opensides.be ([127.0.0.1]) by localhost (smtp.opensides.be [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vPSqPtZ5h8Cy for ; Wed, 19 Feb 2020 16:05:21 +0100 (CET) Received: from mcmic-probook.opensides.be (63.120.199.77.rev.sfr.net [77.199.120.63]) by smtp.opensides.be (Postfix) with ESMTPSA id BA75249E96B for ; Wed, 19 Feb 2020 16:05:21 +0100 (CET) To: internals@lists.php.net Date: Wed, 19 Feb 2020 16:05:21 +0100 Message-ID: <1899933.aHXfNPd5U9@mcmic-probook> Organization: FusionDirectory User-Agent: KMail/5.2.3 (Linux/4.9.0-12-amd64; KDE/5.28.0; x86_64; ; ) In-Reply-To: <497658C4-4799-47DE-A7C7-11C1B742F9E3@cschneid.com> References: <16481aca-93f4-43f5-5ec2-413d19ade318@gmail.com> <2444450.8GC8745SYh@mcmic-probook> <497658C4-4799-47DE-A7C7-11C1B742F9E3@cschneid.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Subject: Re: [PHP-DEV] Allow null variables to be decremented From: come.chilliet@fusiondirectory.org (=?ISO-8859-1?Q?C=F4me?= Chilliet) Le mercredi 19 f=E9vrier 2020, 15:59:24 CET Christian Schneider a =E9crit : > Am 19.02.2020 um 15:52 schrieb C=F4me Chilliet : > > Is there any reason the engine is not running the same code or even com= piling to the same opcodes $a++ and $a+=3D1? > > If it should never differ, why is it not the same operation? >=20 > $a++ is magic, see example #1 at https://www.php.net/manual/en/language.o= perators.increment.php=20 >=20 > And no, this should not be changed as it would be a major BC. Right, $a+=3D1 is the same as ++$a, not $a++, my bad, I forgot about this. Is ++$a behaving differently than $a++ for NULL/FALSE/TRUE? =2D-=20 C=F4me Chilliet =46usionDirectory - https://www.fusiondirectory.org