Re: Extension proposal

From: Date: Fri, 26 Oct 2007 07:19:12 +0000
Subject: Re: Extension proposal
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-4908@lists.php.net to get a copy of this message
On 26.10.2007 03:17, Paul Chandler wrote: > Hello, > > I have a very simple extension on SourceForge that I'd like to release with > PECL. In a nutshell, it's an iterator-based replacement for range(), like > Python's. It's intended use is within foreach loops. I don't think it'll be > a high-demand extension, but Python converts might appreciate it. > > <?php > foreach (range(0, 1000000) as $i) // do something > > // vs. // > > foreach (xrange(0, 1000000) as $i) // do something > ?> What's the advantage of it? (except that it's like Python). Also I don't see any differences from range() in the example code given above. -- Wbr, Antony Dovgal

« previous php.pecl.dev (#4908) next »