Req #17565 [Com]: optional ORDER parameter for range()

From: Date: Tue, 23 Aug 2011 14:42:44 +0000
Subject: Req #17565 [Com]: optional ORDER parameter for range()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-162857@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=17565&edit=1 ID: 17565 Comment by: datibbaw@php.net Reported by: bigredlinux at yahoo dot com Summary: optional ORDER parameter for range() Status: Open Type: Feature/Change Request Package: Feature/Change Request Operating System: Linux PHP Version: 4.2.1 Block user comment: N Private report: N New Comment: range() now has that option since 5.0, though it will still assume the step size is negative when the start value is higher than the end value. Previous Comments: ------------------------------------------------------------------------ [2002-06-02 05:52:40] bigredlinux at yahoo dot com The range() function has the ability to generate a range from one number (or character) to another. It states in the documentation that if the first number (character) is greater than the second, it creates a decreasing range. However, the problem is, sometimes you don't want it to switch range order, so it would be nice to have a third parameter which states the direction or states whether you want it to auto flip. Hence, if I did range(9, 0, ASC) it would generate an empty array... or prehaps I could do range(9, 0, false) for not autoflipping. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=17565&edit=1

« previous php.bugs (#162857) next »