On Sat, Nov 23, 2002 at 03:37:29PM +0900, Moriyoshi Koizumi wrote:
> I've just found range() behaves unexpectedly in some special cases.
>
> For instance, please try the following script.
>
> <?php
> echo count(range('a', 'z', 12));
> ?>
>
> will give 45 while it should return an array that consists of 3 elements.
> That is because the counting may exceed the upper limit of positive char
> value during the loop.
>
> The attached patch is a fix for this issue. I'll commit this if there are
> no objections.
No objections (although I haven't actually applied and run your
patch). Thanks for investigating this. I should have tested a wider
set of step values in my original tests.
--
Jon Parise ([EMAIL PROTECTED]) :: The PHP Project (http://www.php.net/)
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php