ID:               21060
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: Linux 2.4.18
 PHP Version:      4CVS-2002-12-16 (dev)
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Nothing wrong with this behaviour, the low & high point are the same,
hence the false output indicating failure.


Previous Comments:
------------------------------------------------------------------------

[2002-12-17 01:13:37] [EMAIL PROTECTED]


<?php

range(2,2);

?>

Warning: range() [http://www.php.net/function.range]: 
step exceeds the specified range in - on line 3

Numerous scripts expect range() to return the low 
(or high) value (in this case 2 ) when low == high. 

This is useful in cases where the low and high values
are dynamically generated.

But since the default step is 1, there is a warning
and a FALSE returned when low == high.

http://freedomink.org/code/php/patches/array.c.patch

The above patch makes range return low when 
(low == high).

Please comment.

- Chandrashekhar


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21060&edit=1

Reply via email to