Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105223 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 93224 invoked from network); 10 Apr 2019 23:47:45 -0000 Received: from unknown (HELO v-smtpout2.han.skanova.net) (81.236.60.155) by pb1.pair.com with SMTP; 10 Apr 2019 23:47:45 -0000 Received: from [192.168.7.8] ([213.64.245.126]) by cmsmtp with ESMTPA id EK5ah8VGJEqdOEK5ahIxcB; Wed, 10 Apr 2019 22:44:58 +0200 To: Nikita Popov References: Cc: PHP internals Message-ID: <37faa216-24b9-fd3a-d29c-41c36710e2a4@telia.com> Date: Wed, 10 Apr 2019 22:44:59 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-CMAE-Envelope: MS4wfHyIeCUTCCiVlwH2IuT10DfYflY32z2NSSmQl8WD91HXZenZVxx8riGpmltDOtEhvDNC5BCIcfiyVjOvIqhXAgG0BZEnhSqXdXw224MODfldEhFyOz4h gg2Lt6CYe0aIauwjMff4p7srpP9tfIDn9E4DVvtTDHTmZG4bjHQr3B2fLOqEgpPw0tboh0R1nj1KDhxfnZGpFWkMNn2knQ6KVUxHPTWEpY9YmtmdSGaUN16M Subject: Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator From: bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_Larsson?=) Den 2019-04-09 kl. 11:54, skrev Nikita Popov: > Hi internals, > > Inspired by Bob's recent RFC for concat precedence, I'd like to propose a > deprecation and removal of the left-associative behavior of ternaries. > Instead, explicit parentheses should be used: > > https://wiki.php.net/rfc/ternary_associativity > > This RFC makes nested ternaries without disambiguating parentheses an error > in PHP 8 -- we might want to consider making them right-associative > instead, which is both useful and matches the behavior of other languages. > > Regards, > Nikita Thanks for bringing this up. I recall it was up for discussion in PHP 7.0, never made it then. Hope it does it now! Should one in the RFC reference this bug report from 2012? - https://bugs.php.net/bug.php?id=61915 r//Björn L