Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:90695 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87518 invoked from network); 18 Jan 2016 12:35:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jan 2016 12:35:45 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.204 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.204 mail4.serversure.net Linux 2.6 Received: from [217.147.176.204] ([217.147.176.204:51766] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A7/E8-20254-E1CDC965 for ; Mon, 18 Jan 2016 07:35:43 -0500 Received: (qmail 5521 invoked by uid 89); 18 Jan 2016 12:35:40 -0000 Received: by simscan 1.3.1 ppid: 5515, pid: 5518, t: 0.0739s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.7?) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 18 Jan 2016 12:35:40 -0000 To: internals@lists.php.net References: <3B.E6.32157.D3DFA965@pb1.pair.com> <569C91FE.8030605@php.net> Message-ID: <569CDC1C.2070304@lsces.co.uk> Date: Mon, 18 Jan 2016 12:35:40 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <569C91FE.8030605@php.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Allow specifying keys in list() From: lester@lsces.co.uk (Lester Caine) On 18/01/16 07:19, Michael Wallner wrote: >> Here's an RFC that would extend the syntax of list() to be more useful >> > with associative arrays: >> > >> > https://wiki.php.net/rfc/list_keys >> > >> > Please read it and tell me your thoughts. > Hi! > > I found the idea convincing from the first read, but maybe it's just my > mind's assumptions about list() that I dislike the resulting syntax, > yet, it seems to be the logical choice. > > So, maybe I'm just trying to say, that I don't like list() to be reused > for that, but I don't have any better idea otherwise. As someone still using 'extract' in legacy code, I can sort of see the logistics of this, but why not just extend 'extract' to use the current object rather than the symbol table. It already has handling for duplicate keys and to prefix the 'array' name to the resulting variables. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk