Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:90686 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46686 invoked from network); 18 Jan 2016 01:53:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jan 2016 01:53:52 -0000 Authentication-Results: pb1.pair.com header.from=bishop.bettini@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bishop.bettini@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.45 as permitted sender) X-PHP-List-Original-Sender: bishop.bettini@gmail.com X-Host-Fingerprint: 74.125.82.45 mail-wm0-f45.google.com Received: from [74.125.82.45] ([74.125.82.45:36313] helo=mail-wm0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/F3-20254-FA54C965 for ; Sun, 17 Jan 2016 20:53:52 -0500 Received: by mail-wm0-f45.google.com with SMTP id l65so81685558wmf.1 for ; Sun, 17 Jan 2016 17:53:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=03Gn0Ykz5l/A1zlKC4nPhjRxdFzUQkVA4ynb0Pp1mhk=; b=t31SaS7T6PArHhEibGmWksrSzKTBACtgoi7GAJwzvjH69NfLXgJPUqMRFePGAAZZGV 0LMDyxULTu8Sdx8gkQDMcZg+peyy49OAsy6xiGyXQfhhLg0WaKweLcpX0HPkDiz+OulV ALg4on5znj1JeAtyNNkH0pmBWfjr/6F1/ifK1FO0s/EY2zF42hbWfH3ZN1aWsg8O9JBZ Nv42oyXQMM6DA7kHd4xEjV5ArlROsYXYaQP1FyvK7ZzLN/qCK+yTFWsnv4StJyBS2ri4 9uAQzLkIAzU/eYcbItGqA90rPda+WtRpfD18OhhdgQB2c5W3Av8Q751qE/9/stDTSUF6 8Gaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:sender:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=03Gn0Ykz5l/A1zlKC4nPhjRxdFzUQkVA4ynb0Pp1mhk=; b=Zl9l76RBqYgvT5VDXrEQxiN1iZPD7dByo1VK1P+qTh4bexvKi+16ikHHMRe5jcrl8q zNhwRKWrN3/D8gU+gFublZQzACbNWirb5pCQ9SFzFYuzSSEEVOQVmMxu9qsg6vPmJuwy HhvK65NCnWrV1ig6jqJdSlilyE0AcidUU+iKbfbCfcZWGanlSkm/N3ZhIos/YG7TDxez 6JADPGSVqHl6cmT0GQERMdOlr/1/Kcf8L2flmtvl3NqEcvsOsT12Nc/3rVDc9PCDCZFa NrXNjK1VkpmWPdSCn+RtdjW5hn37Zj6mTy4k8+EXOSCKcaXKihQY1ONjl8/Q64Qaewuo H8Nw== X-Gm-Message-State: ALoCoQlaAAPkwG7rX6pqlPYA/LuowvBB8bDv0HM/a+AJkbzV4mxt8kJSEtVHu/Zrmls+WleqLNNAEVHrWF+WaXOKp7p1bmYrKA== X-Received: by 10.194.209.129 with SMTP id mm1mr23907811wjc.47.1453082029270; Sun, 17 Jan 2016 17:53:49 -0800 (PST) MIME-Version: 1.0 Reply-To: bishop@php.net Sender: bishop.bettini@gmail.com Received: by 10.194.205.10 with HTTP; Sun, 17 Jan 2016 17:53:19 -0800 (PST) In-Reply-To: <3B.E6.32157.D3DFA965@pb1.pair.com> References: <3B.E6.32157.D3DFA965@pb1.pair.com> Date: Sun, 17 Jan 2016 20:53:19 -0500 X-Google-Sender-Auth: JIBnQ7YaOFMHor29SZq25e2S7cE Message-ID: To: Andrea Faulds Cc: PHP internals Content-Type: multipart/alternative; boundary=047d7b3a840a2f2d060529920681 Subject: Re: [PHP-DEV] [RFC] Allow specifying keys in list() From: bishop@php.net (Bishop Bettini) --047d7b3a840a2f2d060529920681 Content-Type: text/plain; charset=UTF-8 On Sat, Jan 16, 2016 at 9:32 PM, Andrea Faulds wrote: > Hi everyone, > > 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. > Nice, Andrea, thanks! Destructuring is quite handy. I wonder if there is opportunity to include array gathering. Something along the lines of: list ('foo' => $foo, ...$rest) = [ 'foo' => 1, 'bar' => 2, 'baz' => 3]; assert $foo === 1; assert $rest === [ 'bar' => 2, 'baz' => 3]; What do you think? --047d7b3a840a2f2d060529920681--