Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62480 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40798 invoked from network); 25 Aug 2012 12:34:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2012 12:34:15 -0000 Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vc0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:63375] helo=mail-vc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F2/96-06857-546C8305 for ; Sat, 25 Aug 2012 08:34:13 -0400 Received: by vcbgb30 with SMTP id gb30so3500992vcb.29 for ; Sat, 25 Aug 2012 05:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=3Q85rkks9tLdGKZJhtx6Z2Bx9iCEglbuf3HFmNrCFDs=; b=VxMG/2ol1gXScbhhXYRiJEdXEpWzjLZX2JLpelw3/9DJt23/ZNPKnINm3HyKuTJBCL pl21jiIiZ7YuWYNR94sCavT6VCZucTXqR66g+LWkboWvDzHDe/SPk3wQRjbnc1F+OXVQ 05RLGjQnctxJh1Y1g3qlRQW/eLW0pbh88L3Um2xgC/Vejc75hkpX8uVXXMVopm6kbHNS 2Qp4nvB9vJTdVHpzYMDWvYsZxEptLaTasmA2FZq9NynRDH/PVBvc00ZlqdTJFUyGdalE 2m9T24jUfAIJfvQrZ0FT7ZgiovaOor8Q6dawtExheY2HgRMk7LIGX1njaZcagI2n4KRw BU0g== Received: by 10.58.144.231 with SMTP id sp7mr6408148veb.2.1345898050702; Sat, 25 Aug 2012 05:34:10 -0700 (PDT) MIME-Version: 1.0 Sender: laruence@gmail.com Received: by 10.220.18.15 with HTTP; Sat, 25 Aug 2012 05:33:50 -0700 (PDT) In-Reply-To: References: Date: Sat, 25 Aug 2012 20:33:50 +0800 X-Google-Sender-Auth: asnJVZbOxAYsO_MtPkheJlVhuRY Message-ID: To: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [VOTE]Call for voting: support use list in foreach From: laruence@php.net (Laruence) Hi: Voting closed. Result: foreach supports list syntax: 11 for yes, 4 for no. accepted. foreach supports list with silent token: 2 for yes, 10 for no. denied. thanks for your great advise. I will commit the patch later. thanks On Sat, Aug 18, 2012 at 12:34 PM, Laruence wrote: > Hi: > This feature introduces list() support in foreach constructs(more > info can be found here: https://wiki.php.net/rfc/foreachlist). > > this could make the grammar more consistent, see following example: > > $users = array( > array('Foo', 'Bar'), > array('Baz', 'Qux'); > ); > > // Before > foreach ($users as $user) { > list($firstName, $lastName) = $user; > echo "First name: $firstName, last name: $lastName. "; > } > > // After > foreach ($users as list($firstName, $lastName)) { > echo "First name: $firstName, last name: $lastName. "; > } > ?> > > previous discussion could be found at : > http://marc.info/?l=php-internals&m=134277050215818&w=2 > > please vote for this: https://wiki.php.net/rfc/foreachlist#vote > > thanks :) > > -- > Laruence Xinchen Hui > http://www.laruence.com/ -- Laruence Xinchen Hui http://www.laruence.com/