Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38371 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79962 invoked from network); 19 Jun 2008 00:27:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jun 2008 00:27:53 -0000 X-Host-Fingerprint: 24.228.80.153 ool-18e45099.dyn.optonline.net Received: from [24.228.80.153] ([24.228.80.153:20407] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/91-03518-808A9584 for ; Wed, 18 Jun 2008 20:27:53 -0400 Message-ID: <3C.91.03518.808A9584@pb1.pair.com> To: internals@lists.php.net Date: Wed, 18 Jun 2008 20:27:48 -0400 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041206 Thunderbird/1.0 Mnenhy/0.6.0.104 MIME-Version: 1.0 References: <77972256-ED0C-4FCE-8DEF-8283FE1BBFC5@roshambo.org> <484F0897.4040405@fischer.name> <1213139582.12765.5.camel@localhost> <698DE66518E7CA45812BD18E807866CE01AB3D1D@us-ex1.zend.net> <9b3df6a50806152320l71581b0dmefe2ccc63766d2e5@mail.gmail.com> <28.6B.06776.09A76584@pb1.pair.com> <9b3df6a50806162327r52ae3ad9g65d56c0916571185@mail.gmail.com> <4859A244.6050507@gravitonic.com> In-Reply-To: <4859A244.6050507@gravitonic.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Posted-By: 24.228.80.153 Subject: Re: [PHP-DEV] deprecation status of $str{42} versus $str[42] From: edwardzyang@thewritingpot.com ("Edward Z. Yang") Andrei Zmievski wrote: > Maybe TextIterator can be backported from HEAD, because it allows for > just that. > > foreach (new TextIterator($str) as $c) { > ... > } IIRC, TextIterator is specifically designed for Unicode, letting you iterate over codepoints, combining sequences, characters, words, etc. So making it do all that would only make sense with intl, and even then not really (as Stanislav points out performance-wise). What I was suggesting was a shortcut to iterating over binary data; i.e. byte by byte. -- Edward Z. Yang GnuPG: 0x869C48DA HTML Purifier Anti-XSS Filter [[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]