Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86527 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10851 invoked from network); 9 Jun 2015 16:29:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jun 2015 16:29:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.216.44 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.216.44 mail-vn0-f44.google.com Received: from [209.85.216.44] ([209.85.216.44:40378] helo=mail-vn0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/57-00828-A6417755 for ; Tue, 09 Jun 2015 12:29:33 -0400 Received: by vnbf7 with SMTP id f7so3747425vnb.7 for ; Tue, 09 Jun 2015 09:29:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=5WFx59xvFqmDIzZ1FKIitQhFxTxppZspW+1Y3mgFcMw=; b=Ms7GKYRNmTZlsQonyGEkczyC0QRb4EJ8B5GmZte8EMxq1dGaeLgkRRiZk1hZZp2Tr8 Wq8asphmlcRMwGniir+/rWBrKu2fv49Ey60/2RQ0RI7FsYPQychRW4xslxmkrIG8+NcY jrphc/wQvZxV66K/q4nXV/w68JLbvLgRPHi91e59kgBlYDmrwuvmxJ6TVOlsNUKO36g8 2/FuGHHT/PYhvjw2CBKG9NtxyTmtRaK6p7JFqI2rXfOWgXAor0uQb3k+dcmQbkadE64K xZmCsXBkb6T7DBvZUEAAlGAQzKkDKnj4bWtWV/qvpiVDwPEcokM30Yi0YMXhD1Fro3eF JkPg== X-Gm-Message-State: ALoCoQnddfZJaEETg7VenDzaDQBTCCfkZQOxCVldV2YgHpXS3gRDFSxp/WVWR9tvnxRLG/PMvVxbMzFt9AXwwYr8NFIqwqk/z0d5w+dcCC0FutHGHheMSpCaOlyv75ZcVxqzrnr+orif3BoY/baerVqsptclRYZ+iKZkgxO6UG7H/AeE6ZKYTw8= MIME-Version: 1.0 X-Received: by 10.52.135.4 with SMTP id po4mr43591996vdb.78.1433867367569; Tue, 09 Jun 2015 09:29:27 -0700 (PDT) Received: by 10.52.236.225 with HTTP; Tue, 9 Jun 2015 09:29:27 -0700 (PDT) In-Reply-To: <1FAF88D0E2DE433FA299B4FAF7120880@pc1> References: <55513AA4.7010706@gmail.com> <579127CDC1B54040BEEFD4564A6F78B7@pc1> <1FAF88D0E2DE433FA299B4FAF7120880@pc1> Date: Tue, 9 Jun 2015 19:29:27 +0300 Message-ID: To: Matt Wilmas , Sara Golemon , Anatol Belski , Kalle Sommer Nielsen Cc: Dmitry Stogov , Stanislav Malyshev , PHP internals Content-Type: multipart/alternative; boundary=bcaec52d52dd197df605181843f6 Subject: Re: [PHP-DEV] Undefined variables undefined order From: dmitry@zend.com (Dmitry Stogov) --bcaec52d52dd197df605181843f6 Content-Type: text/plain; charset=UTF-8 I don't see a big problem changing this for few opcodes in PHP-7 VM, and make behavior "more defined". On the other hand I don't think we shouldn't "define" the order of operand evaluation. This may prevent us performing optimisations in the future. Fixing this in PHP-5.* doesn't cost the effort from my point of view. Thanks. Dmitry. On Tue, Jun 9, 2015 at 4:05 PM, Matt Wilmas wrote: > Hi all, > > ----- Original Message ----- > From: "Sara Golemon" > Sent: Monday, May 11, 2015 > > On Mon, May 11, 2015 at 5:12 PM, Matt Wilmas >> wrote: >> >>> ----- Original Message ----- >>> From: "Stanislav Malyshev" >>> Sent: Monday, May 11, 2015 >>> >>> argument. I'd like to propose making the order of evaluation defined >>>>> by splitting this into separate statements: >>>>> >>>> >>>> What is the purpose of this? I.e. why is it important that these notices >>>> would be produced in certain order? >>>> >>> >>> Logic, consistency, "polish," etc. :-) >>> >>> Exactly this. :) >> >> It's just my CDO kicking in. It's not necessary for the language to >> function. Heck, HHVM already matches PHP 5.1-7.0's out-of-order >> behavior, so fixing PHP only creates double work for me. I just look >> at these error messages and twitch uncomfortably. >> > > Hah, looks like this just changed last week after barely 3 weeks. :-P I > didn't verify, just noticed the code change: > http://git.php.net/?p=php-src.git;a=commitdiff;h=c09698753e7d1d95299dca54c8ca888c885fd45b > > Andi hasn't objected, yet. :-O And ironically it was part of an > optimization... > > Now CONCAT is consistent, but not others. Which places need changing > anyway? Just binary ops in VM? > > A couple/few extra instructions are unavoidable, I guess on any > architecture, for the intermediate save of op1, but can anyone show that it > makes ANY measurable difference (other than instruction count)? > > For ADD, MUL, IS_[NOT_]IDENTICAL, IS_[NOT_]EQUAL, BW_*, and BOOL_XOR, ops > can be passed as > > ... result, op2, op1); > > with no ill effects (I think) and still have the same (fewest) > instructions as now! That is, if anyone thinks, or can show, that it > matters. :-) > > Whoops, didn't check first -- I see ADD, MUL, and IS_[NOT_]EQUAL (among > others) are already consistent/fixed (but extra instructions :-D). > > -Sara >> > > - Matt > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --bcaec52d52dd197df605181843f6--