Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61541 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84535 invoked from network); 20 Jul 2012 07:43:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jul 2012 07:43:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.42 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.212.42 mail-vb0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:49048] helo=mail-vb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 74/C7-18983-E1C09005 for ; Fri, 20 Jul 2012 03:43:27 -0400 Received: by vbbfs19 with SMTP id fs19so3177656vbb.29 for ; Fri, 20 Jul 2012 00:43:24 -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=byB2JxnZMSflZmDoytss0BDvoV3uxB9JskgdbQlOnyg=; b=a/yPpm9kvwXDC8HH/K6UvPF7jGyHIgbOkLGlmqlJoEAYkIBTnaSspsZsqXUznsUyZG yB2ai0iY3D/qV/1IF3nNSvajH5acWN/LW1R2zZsID6DiszWEYDLtOLfmMf+2a7o/Nk94 D9pfYfY+Ib+ADJA3DUTCpYd7uxRSISuRXrM0MjnzqOrj9gx9iRiRSJFmFI4MK0cX/rPg FN/q/S/5GjToDiw4JhURqQHa6mCpFQVM9WvIrWrVqqzKIxPjQueCNDwwZEYS/QmRdhIW /9CGOrhNvKCeDiHnsQB+SEVeyUDDjs+bN0Ew6fAcZBDWtP1M6dQgoOcsy2OnW56j7yfq a6ag== Received: by 10.52.30.2 with SMTP id o2mr3012985vdh.132.1342770204272; Fri, 20 Jul 2012 00:43:24 -0700 (PDT) MIME-Version: 1.0 Sender: laruence@gmail.com Received: by 10.221.11.74 with HTTP; Fri, 20 Jul 2012 00:43:04 -0700 (PDT) In-Reply-To: References: Date: Fri, 20 Jul 2012 15:43:04 +0800 X-Google-Sender-Auth: o7XldFDay5B6wrvZMLpUoNx1MsU Message-ID: To: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [RFC] foreach_variable supporting T_LIST From: laruence@php.net (Laruence) Hi: since I proposed last year, and seems no argu here. so maybe we can just step into the voting phase? thanks On Wed, Jul 18, 2012 at 10:55 PM, Laruence wrote: > On Wed, Jul 18, 2012 at 10:49 PM, Laruence wrote: >> Hi: >> this is not a new RFC, I proposed it before, but due to my poor >> english and improper examples, it didn't get passed. > thanks phidev's good english, he re-wrote the descriptions. > > thanks >> >> This feature introduces list() support in foreach constructs(more >> info can be found here: https://wiki.php.net/rfc/foreachlist): >> >> > $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. "; >> } >> ?> >> >> what do you think? personally, I really think it's a good feature. >> >> what about commit this into trunk(php 5.5) ? >> >> thanks >> >> -- >> Laruence Xinchen Hui >> http://www.laruence.com/ > > > > -- > Laruence Xinchen Hui > http://www.laruence.com/ -- Laruence Xinchen Hui http://www.laruence.com/