Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76561 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71859 invoked from network); 15 Aug 2014 16:11:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Aug 2014 16:11:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.54 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.219.54 mail-oa0-f54.google.com Received: from [209.85.219.54] ([209.85.219.54:54667] helo=mail-oa0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/F8-48767-4313EE35 for ; Fri, 15 Aug 2014 12:11:32 -0400 Received: by mail-oa0-f54.google.com with SMTP id n16so2182781oag.13 for ; Fri, 15 Aug 2014 09:11:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=0PsjYfWHiLlFqvmfY9va/Rl//ZKsSxxNp2YfTj2NDoE=; b=uyp7l54h6c07HvONocZeMeKF/9f3LQFmfzc1Huqp0Mcasocb/JOpRmMxG3mTefXw87 kDW0iJwfckmR+8+qaCj7kv9UsV5Q/4yB9AGv7jm24R/wpNl+yzSPBDqZv8scNEzB0r9j k/Q8jhWvHa1D5+tlghcbJzjCUGQK34jBaR0URRV54QcZGnkIit/F5PW7XGRtsGAUlzAj dvHuVRjsno/U47OFI3yi64UDVbfodDWV4Hn72hlsIwp4R7qxVyRVIEJtwCVquSywS2Pn /6iMbesF2gEVGytwPUgh9sWDZw3gQn88gymuZ/hOiNAWDQbQTY6K0DLMKSi9GyeleJvr 5qIg== MIME-Version: 1.0 X-Received: by 10.60.160.38 with SMTP id xh6mr3599023oeb.82.1408119088811; Fri, 15 Aug 2014 09:11:28 -0700 (PDT) Received: by 10.182.65.229 with HTTP; Fri, 15 Aug 2014 09:11:28 -0700 (PDT) In-Reply-To: <53EE2E20.5060707@gmx.de> References: <3F1B2834-3939-4F86-86E0-207D2CE469D6@ajf.me> <53EE2E20.5060707@gmx.de> Date: Fri, 15 Aug 2014 18:11:28 +0200 Message-ID: To: Christoph Becker Cc: Andrey Andreev , PHP internals , Andrea Faulds , "guilhermeblanco@gmail.com" Content-Type: multipart/alternative; boundary=089e011847a21714c20500ad468b Subject: Re: [PHP-DEV] [RFC] Introduce Abstract Syntax Tree From: nikita.ppv@gmail.com (Nikita Popov) --089e011847a21714c20500ad468b Content-Type: text/plain; charset=UTF-8 On Fri, Aug 15, 2014 at 5:58 PM, Christoph Becker wrote: > Andrey Andreev: > > > I'd personally find it horrible if $foo[$i] = $bar[$i++]; is executed > > right-to-left, but given that your examples are a bit weird, I'm not sure > > if mine is affected. Is it? > > Isn't that evaluated from right to left already since PHP 5.1.0? See > . > Yes, anything containing simple variables (like $i) will often deviate from the usual evaluation order due to the CV optimization. I don't touch that. What I've changed now is that ${a()}[b()] = c() will continue to call a, b, c, rather than calling c, b, a (which was what the AST implementation initially did). I honestly don't think that it matters, but I figured that it's best to stick with the more "logical" behavior as long as it's not too much trouble :) Nikita --089e011847a21714c20500ad468b--