Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61035 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30823 invoked from network); 29 Jun 2012 04:46:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jun 2012 04:46:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=davidkmuir@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=davidkmuir@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.42 as permitted sender) X-PHP-List-Original-Sender: davidkmuir@gmail.com X-Host-Fingerprint: 209.85.210.42 mail-pz0-f42.google.com Received: from [209.85.210.42] ([209.85.210.42:42531] helo=mail-pz0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/DC-62543-F033DEF4 for ; Fri, 29 Jun 2012 00:46:07 -0400 Received: by dalf4 with SMTP id f4so4288132dal.29 for ; Thu, 28 Jun 2012 21:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=LQi3b05Mqi87uTcHPAh1No5N0eU02GLJQdcyCHYjDas=; b=q+fDrni4qBJbl3OuPlnAaCIfGPjgsEV93+hl4MyWk7kcgxPxx37Xu6AtJVxw2HxoU7 HfUxXj/ezl8HzcfhQUA87ati7QAftswGCZ6bmecXW6FhfKiIJHBiPf/n7fqszEC7IA/U PqchWhI7OZ2Na7bMJS7lRM0OvessL8qcixNTy9T27bliV42TKloZ0hJEj5+gB08p3JvQ 6rfy84Tvwv2so+8FSwiazA+kUMZp5Pz1hdZKa2OSLWPWhPgexT9LrMdklW8RsuU9ZMVT 8za0d/22VWarbbX4cd1NnXKQ6Gm0pR9CBJIDIQBF7K1poH7/Cx14C7r7EGVLNVoUAPm8 N2wg== Received: by 10.68.233.225 with SMTP id tz1mr2316614pbc.4.1340945164600; Thu, 28 Jun 2012 21:46:04 -0700 (PDT) Received: from [0.0.0.0] (tmwpho1.lnk.telstra.net. [110.142.207.74]) by mx.google.com with ESMTPS id ku7sm4238985pbc.31.2012.06.28.21.46.02 (version=SSLv3 cipher=OTHER); Thu, 28 Jun 2012 21:46:04 -0700 (PDT) Message-ID: <4FED332B.8020506@gmail.com> Date: Fri, 29 Jun 2012 14:46:35 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Sebastian Krebs CC: PHP internals References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] List comprehensions and generator expressions for PHP From: davidkmuir@gmail.com (David Muir) On 28/06/12 23:45, Sebastian Krebs wrote: > Hi, > > 2012/6/28 David Muir > >> I'd assume that array_map() only works with arrays, while list >> comprehension should work with anything traversable. >> > That sounds more like a "bug" (better: "Missing feature") in array_map() > and less a missing language feature... All the array_* functions only work with arrays, and don't allow objects, even ones implementing ArrayAccess. It's been there as a feature request since 2007: https://bugs.php.net/bug.php?id=43650 Cheers, David