Re: Stepping on range()

From: Date: Tue, 12 Nov 2002 15:30:29 +0000
Subject: Re: Stepping on range()
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-90870@lists.php.net to get a copy of this message
On Mon, 11 Nov 2002, Jon Parise wrote: > Attached is a patch that adds an optional "step" parameter to the > range() function. This allows the generation of ranges based on a > non-one increment. For example: > > range(0, 10, 2); > > ... would yield an array containing (0, 2, 4, 6, 8, 10). > > The change is entirely backwards-compatible with the existing > behavior of range(). > > I've also attached a test script for the new functionality. > > I haven't committed the changes in the interest of getting PHP 4.3.0 > out the door, but I will if no one sees a problem. Otherwise, I can > hang onto this until after the release. > > Documentation updates will accompany with the commit. I like this, but I think it's a good idea to wait with committing until 4.3.0 has been branched. Derick > -- --------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --------------[ if you hold a unix shell to your ear, do you hear the c? ]-

« previous php.dev (#90870) next »