Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53393 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45701 invoked from network); 20 Jun 2011 12:07:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jun 2011 12:07:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:48084] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/4C-34681-4E73FFD4 for ; Mon, 20 Jun 2011 08:07:00 -0400 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 46BA8DE13E; Mon, 20 Jun 2011 13:06:57 +0100 (BST) Date: Mon, 20 Jun 2011 13:06:57 +0100 (BST) X-X-Sender: derick@whisky To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= cc: Robert Eisele , internals@lists.php.net In-Reply-To: <1308570997.3172.21.camel@guybrush> Message-ID: References: <1308570997.3172.21.camel@guybrush> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1690450246-1308571617=:3774" Subject: Re: [PHP-DEV] foreach() for strings From: derick@php.net (Derick Rethans) --8323328-1690450246-1308571617=:3774 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 20 Jun 2011, Johannes Schl=C3=BCter wrote: > On Mon, 2011-06-20 at 13:27 +0200, Robert Eisele wrote: > > foreach() has many functions, looping over arrays, objects and implemen= ting > > the iterator interface. I think it's also quite intuitive to use foreac= h() > > for strings, too. >=20 > I would prefer a TextIterator as we had in the old PHP 6 as this allows > more powerful filtering etc. using iterator semantics even though this > might be a bit slower. I think TextIterator is another good addition, but it will make PHP=20 depend on ICU. Therefore, I think just a foreach for strings seems=20 valuable to me. Derick --8323328-1690450246-1308571617=:3774--