Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91098 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5939 invoked from network); 6 Feb 2016 13:51:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2016 13:51:13 -0000 X-Host-Fingerprint: 2.221.202.162 unknown Received: from [2.221.202.162] ([2.221.202.162:17445] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/F0-28222-F4AF5B65 for ; Sat, 06 Feb 2016 08:51:12 -0500 Message-ID: <92.F0.28222.F4AF5B65@pb1.pair.com> To: internals@lists.php.net References: <38.31.07203.2EB94B65@pb1.pair.com> Date: Sat, 6 Feb 2016 13:51:08 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 2.221.202.162 Subject: Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list() From: ajf@ajf.me (Andrea Faulds) Hi Levi, Levi Morrison wrote: > I wanted to chime in since I voted no. I'm not strongly opposed to > this behavior but I do have concerns about the key behavior that was > changed. In an example in the RFC: > > list($foo => $bar) = $array; > > I don't think this really makes sense. `$foo` is being evaluated and > its value is used to look up the key in `$array`, but `$bar` is being > assigned to even though it's a similar place as `$foo`. > > I don't think I've really expressed well what I am trying to convey > but I think this RFC would be much better *without* this change, so > I've voted no. Well, this is why we have discussion periods. I brought this up before as an open issue. Nobody told me they objected to it, and everyone who did respond told me they favoured the current behaviour. I decided, therefore, that the risk of confusion was low. -- Andrea Faulds https://ajf.me/