Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79666 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71299 invoked from network); 15 Dec 2014 18:55:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Dec 2014 18:55:21 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.46 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.46 mail-wg0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:51188] helo=mail-wg0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/68-16076-49E2F845 for ; Mon, 15 Dec 2014 13:55:16 -0500 Received: by mail-wg0-f46.google.com with SMTP id x13so15420285wgg.5 for ; Mon, 15 Dec 2014 10:55:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=6YqujYGjZWDG/SKcfeJgotDl2F+gmwv62tFDg6xoi+s=; b=DhFir3apyUvzmx7P9zxwh4sWqOamjkCYEQ6b6COM9bWiw/mADl9FYQAx6DuYjLR7v/ Ozz/mCT2XxVyrkBY7PmOKUz7N1SNr3KpOjef27NI0oMQt6Nbk1aUnOJXzlsTkLSEO+fo Vaq65i8yCZkr4XywO7BRgKOGhGX74p+8+N6fjhA7NIW1vrD69YDoyIQIHdQRGzOw3YJf u9FiscoOqAylOArgAMUgWhWLtlo5sGKe/xr2ujINtfZhfsbGY9P2b5vkb5TUTQVR6cUT bdrgHOk3dik3VvkShG9Nkf+ocYYgZ+GGqPkKFRAFfn2U8PLRB8vHUVApNPcqdda0JUOb NoRw== X-Received: by 10.194.90.10 with SMTP id bs10mr55496312wjb.43.1418669712185; Mon, 15 Dec 2014 10:55:12 -0800 (PST) Received: from [192.168.0.148] ([62.189.198.114]) by mx.google.com with ESMTPSA id o2sm14029597wja.45.2014.12.15.10.55.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Dec 2014 10:55:11 -0800 (PST) Message-ID: <548F2E75.2070601@gmail.com> Date: Mon, 15 Dec 2014 18:54:45 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0? From: rowan.collins@gmail.com (Rowan Collins) Leon Sorokin wrote on 13/12/2014 22:45: > Hi guys, > > I was wondering if 7.0 could be the version to fix the long-standing > incorrect ternary associativity bug in PHP [1]. This seems especially > worthy of reconsideration since the Null Coalesce RFC has been > accepted and merged [2] with the correct associativity [3]. > > The major version change seems like the only time to get this done in > PHP. > > [1] https://bugs.php.net/bug.php?id=61915 > [2] https://wiki.php.net/rfc/isset_ternary > [3] http://news.php.net/php.internals/79584 > > thanks, > > -- > Leon Sorokin > Actually, thinking further on this, I'm not sure I've ever actually been affected by the associativity of ?: one way or the other. I have fallen foul of its precedence relative to concatenation, as in: echo 'hello' . false ? ' world' : ' there' . '!'; http://3v4l.org/i7cSc But I think this is the same in other languages, and not related to this bug? Regards, -- Rowan Collins [IMSoP]