Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86521 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91883 invoked from network); 9 Jun 2015 13:05:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jun 2015 13:05:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 216.33.127.80 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 216.33.127.80 mta11.charter.net Solaris 10 1203 Received: from [216.33.127.80] ([216.33.127.80:58659] helo=mta11.charter.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 78/44-00828-D94E6755 for ; Tue, 09 Jun 2015 09:05:34 -0400 Received: from imp11 ([10.20.200.11]) by mta11.charter.net (InterMail vM.8.01.05.09 201-2260-151-124-20120717) with ESMTP id <20150609130530.SYSN5815.mta11.charter.net@imp11>; Tue, 9 Jun 2015 09:05:30 -0400 Received: from mtaout006.msg.strl.va.charter.net ([68.114.190.31]) by imp11 with smtp.charter.net id eD5W1q0060h5dSU05D5WaJ; Tue, 09 Jun 2015 09:05:30 -0400 Received: from impout001 ([68.114.189.16]) by mtaout006.msg.strl.va.charter.net (InterMail vM.9.00.015.01 201-2473-143-101) with ESMTP id <20150609130530.HIJD7012.mtaout006.msg.strl.va.charter.net@impout001>; Tue, 9 Jun 2015 08:05:30 -0500 Received: from pc1 ([96.35.251.86]) by impout001 with charter.net id eD5W1q00A1sc0so01D5Wb8; Tue, 09 Jun 2015 08:05:30 -0500 X-Authority-Analysis: v=2.1 cv=If4JWAaa c=1 sm=1 tr=0 a=Is5gsZaFXO8aPum+t7Tz+g==:117 a=Is5gsZaFXO8aPum+t7Tz+g==:17 a=hOpmn2quAAAA:8 a=N659UExz7-8A:10 a=BCPeO_TGAAAA:8 a=pGLkceISAAAA:8 a=67BIL_jfAAAA:8 a=yNRGXWk1-v2rLBEZABAA:9 a=pILNOxqGKmIA:10 Message-ID: <1FAF88D0E2DE433FA299B4FAF7120880@pc1> To: "Sara Golemon" , "Dmitry Stogov" Cc: "Stanislav Malyshev" , "PHP internals" References: <55513AA4.7010706@gmail.com><579127CDC1B54040BEEFD4564A6F78B7@pc1> Date: Tue, 9 Jun 2015 08:05:30 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Subject: Re: [PHP-DEV] Undefined variables undefined order From: php_lists@realplain.com ("Matt Wilmas") 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