#40334 [Opn->Bgs]: natsort() does not work for some numbers...
| From: | tony2001@php.net | Date: | Fri, 02 Feb 2007 23:09:25 +0000 |
| Subject: | #40334 [Opn->Bgs]: natsort() does not work for some numbers... | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-108359@lists.php.net to get a copy of this message | ||
ID: 40334
Updated by: tony2001@php.net
Reported By: den4b at mail dot ru
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: Windows XP SP2
PHP Version: 5.2.0
New Comment:
These numbers are called octal.
http://www.php.net/manual/en/language.types.integer.php
Previous Comments:
------------------------------------------------------------------------
[2007-02-02 22:00:49] den4b at mail dot ru
Description:
------------
natsort() does not work for some numbers...
Reproduce code:
---------------
$a = array('02', '1', '02000', '03');
natsort($a);
print_r($a);
Expected result:
----------------
Array
(
[1] => 1
[0] => 02
[3] => 03
[2] => 02000
)
Actual result:
--------------
Array
(
[0] => 02
[2] => 02000
[3] => 03
[1] => 1
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40334&edit=1