#24220 [Opn->Csd]: String conversion to numbers in "range()"
| From: | iliaa@php.net | Date: | Tue, 17 Jun 2003 13:20:59 +0000 |
| Subject: | #24220 [Opn->Csd]: String conversion to numbers in "range()" | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969354554@lists.php.net to get a copy of this message | ||
ID: 24220
Updated by: iliaa@php.net
Reported By: minakov at bas-net dot by
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: WinXP
PHP Version: 4.3.1
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2003-06-17 05:39:05] derick@php.net
This is a doc problem. From PHP 4.1.0 and higher you can also use
characters as a range... and the function effectively does range("2",
"2") now (it takes the first character).
------------------------------------------------------------------------
[2003-06-17 05:32:25] minakov at bas-net dot by
Description:
------------
I've found a bug with "range" in PHP 4.3.1;
eg.
print_r(range("2003", "2004")) != print_r(range(2003, 2004));
print_r(range("2003", "2004")) == print_r(range(2, 2));
Reproduce code:
---------------
print_r(range("2003", "2004"));
Expected result:
----------------
Array
(
[0] => 2003
[1] => 2004
)
Actual result:
--------------
Array
(
[0] => 2
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24220&edit=1