Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76734 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15251 invoked from network); 20 Aug 2014 14:42:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Aug 2014 14:42:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.175 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.175 mail-ob0-f175.google.com Received: from [209.85.214.175] ([209.85.214.175:54085] helo=mail-ob0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/B6-11231-7B3B4F35 for ; Wed, 20 Aug 2014 10:41:59 -0400 Received: by mail-ob0-f175.google.com with SMTP id wp18so6338868obc.20 for ; Wed, 20 Aug 2014 07:41:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=7m1420J+nw6I401t7uBXVPk/AMVIKAib0mjVY8NgPA0=; b=hL5vVXU70oQvVki51WNt5wp/ao2FutXlIOTWKkx8J+OksPvbOsNB7HI+/UwrbpqNLX L1y9ok6fF7lPJuTRpzz9jp4TnA7HtE+tC2XDJoxqvsAIWh6z2O3d/Fc2689W9PessL+P /IguuofMZW4y/sJEVwFx5WC9l6omJkRw6rYhGLq/yXHs/lIZGSFqIngVQwOPjfDUxPxO hzs0dy9aMwXhvQgwSxXgazIUD31ZJhBWzddedauu6mhciIaeX53oxvHWiOnvPO54G7pW lE0YqFE9ghJtPj7t1GhUc+ra+HxoZ/DR2uOmF8JRVvzG8cgWNnGfzVy6Yu2Lo8HgrU8O oUjw== MIME-Version: 1.0 X-Received: by 10.182.24.101 with SMTP id t5mr48357013obf.31.1408545716883; Wed, 20 Aug 2014 07:41:56 -0700 (PDT) Sender: morrison.levi@gmail.com Received: by 10.76.157.231 with HTTP; Wed, 20 Aug 2014 07:41:56 -0700 (PDT) In-Reply-To: References: Date: Wed, 20 Aug 2014 08:41:56 -0600 X-Google-Sender-Auth: Wygcpu1rtlCIRAkxFKcamWHwLS0 Message-ID: To: Paul Dragoonis Cc: Andi Gutmans , Nikita Popov , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [VOTE] Abstract Syntax Tree From: levim@php.net (Levi Morrison) On Wed, Aug 20, 2014 at 7:30 AM, Paul Dragoonis wrote= : > On Tue, Aug 19, 2014 at 3:32 AM, Andi Gutmans wrote: > >> Hi Nikita, >> >> I reviewed the AST RFC on my way to vote but there was something that >> wasn=E2=80=99t clear to me. >> This patch introduces some semantic/behavioral changes in addition to th= e >> AST. >> Are these as a side-effect of how AST was implemented? Or are they >> unrelated to the AST patch? >> I think some of them make sense but I=E2=80=99m having a bit of a hard t= ime >> separating out the benefits of the AST (which I really like) and making >> other changes to semantics w/o really understanding if they are >> side-effects and we have no choice vs. we=E2=80=99re trying to solve for= two >> separate items in one RFC. >> Any BC breaks here we think could bite us? >> > > Hi Nikita, > > I second some of Andi's concerns about behavioural changes, some things > working from right-to-left and not left-to-right. Are these things that w= e > can adapt the AST part or tweak another part to make this more consistent > with previous versions of PHP. I just had a chat with Paul about this, and there was a misunderstanding about what this RFC actually does regarding left-to-right evaluation on list() constructs. I also saw this misunderstanding in a few other places, so it seems to be a common misunderstanding. Under the proposed changes as well as in PHP 5.x, the end result of the following is the same: list($a, $b) =3D array(1, 2); $a will be 1 and $b will be 2. Again, this hasn't changed. The difference is that in PHP 5.x the variable $b will be assigned 2 before $a is assigned 1; under these changes $a will be assigned 1 first and then $b will be assigned 2. This really only affects strange situations, such as ones listed in the RFC= .