Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38369 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76107 invoked from network); 19 Jun 2008 00:03:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jun 2008 00:03:23 -0000 Authentication-Results: pb1.pair.com header.from=andrei@gravitonic.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=andrei@gravitonic.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain gravitonic.com from 64.233.166.177 cause and error) X-PHP-List-Original-Sender: andrei@gravitonic.com X-Host-Fingerprint: 64.233.166.177 py-out-1112.google.com Received: from [64.233.166.177] ([64.233.166.177:21314] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/E0-03518-A42A9584 for ; Wed, 18 Jun 2008 20:03:23 -0400 Received: by py-out-1112.google.com with SMTP id a25so238088pyi.16 for ; Wed, 18 Jun 2008 17:03:20 -0700 (PDT) Received: by 10.115.19.19 with SMTP id w19mr1685431wai.195.1213833799557; Wed, 18 Jun 2008 17:03:19 -0700 (PDT) Received: from ws-050.prv.corp.outspark.com ( [12.51.40.234]) by mx.google.com with ESMTPS id a8sm14075704poa.12.2008.06.18.17.03.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Jun 2008 17:03:17 -0700 (PDT) Message-ID: <4859A244.6050507@gravitonic.com> Date: Wed, 18 Jun 2008 17:03:16 -0700 User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070807) MIME-Version: 1.0 To: Arvids Godjuks CC: "Edward Z. Yang" , internals@lists.php.net 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> In-Reply-To: <9b3df6a50806162327r52ae3ad9g65d56c0916571185@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] deprecation status of $str{42} versus $str[42] From: andrei@gravitonic.com (Andrei Zmievski) Maybe TextIterator can be backported from HEAD, because it allows for just that. foreach (new TextIterator($str) as $c) { ... } Arvids Godjuks wrote: > 2008/6/16 Edward Z. Yang : > >> PHP userland code may not treat strings as first class arrays, but >> that's certainly how they are represented internally. >> >> Anyway, it would be neat if we could get that foreach syntax to work. I >> get sick of for($i = 0, $c = strlen($str); $i < $c; $i++) very quickly. >> >> > Totaly agree, the best example from the whole thread >