Re: [PHP-DEV] Re: #21060 [Opn-Bgs]: range() gives warning and returns false when low == high

2002-12-21 Thread Ilia A.
Since we are so close to the 4.3.0 the 'fix' for range() will not make it to 
the 4.3.0 release. However, for the 4.4.0 release I've committed an extensive 
patch that greatly extends the functionality of range().
This includes support for float modifier, detection of numeric values passed 
as strings and of course the handling for the high == low condition.

Ilia

On December 20, 2002 10:49 pm, Chandrashekhar Bhosle wrote:
 On Fri, 20 Dec 2002 09:44:49 -0500

 Ilia A. [EMAIL PROTECTED] wrote:
What would be an output then, array() ?
  
   range(2,4) gives  array(2,3,4);
   range(2,3) gives  array(2,3);
   range(2,2) gives  array(2);
 
  Good idea, +1.
 
  I'll prepare a patch.

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

 My patch submitted with the bug report does exactly that.
 (Returns array(low) if high == low.)

 I would appreciate if you had a look at it.

 - cnb


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: #21060 [Opn-Bgs]: range() gives warning and returns false when low == high

2002-12-20 Thread Ilia A.
On December 20, 2002 09:37 am, you wrote:
 On Fri, 20 Dec 2002, Ilia A. wrote:
  On December 20, 2002 06:35 am, you wrote:
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.
  
   Actually, I think this is a bug, and I see the usefulnes in having the
   floor and bottom having the same value. I can write up a patch if
   needed.
 
  What would be an output then, array() ?

 range(2,4) gives  array(2,3,4);
 range(2,3) gives  array(2,3);
 range(2,2) gives  array(2);

Good idea, +1.

I'll prepare a patch.

Ilia

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: #21060 [Opn-Bgs]: range() gives warning and returns false when low == high

2002-12-20 Thread Chandrashekhar Bhosle

On Fri, 20 Dec 2002 09:44:49 -0500
Ilia A. [EMAIL PROTECTED] wrote:

   What would be an output then, array() ?
 
  range(2,4) gives  array(2,3,4);
  range(2,3) gives  array(2,3);
  range(2,2) gives  array(2);
 
 Good idea, +1.
 
 I'll prepare a patch.

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

My patch submitted with the bug report does exactly that.
(Returns array(low) if high == low.)

I would appreciate if you had a look at it.

- cnb

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php