#40334 [NEW]: natsort() does not work for some numbers...
| From: | den4b at mail dot ru | Date: | Fri, 02 Feb 2007 22:00:50 +0000 |
| Subject: | #40334 [NEW]: natsort() does not work for some numbers... | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-108353@lists.php.net to get a copy of this message | ||
From: den4b at mail dot ru
Operating system: Windows XP SP2
PHP version: 5.2.0
PHP Bug Type: Arrays related
Bug description: natsort() does not work for some numbers...
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 bug report at http://bugs.php.net/?id=40334&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40334&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40334&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40334&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40334&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40334&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40334&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40334&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40334&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40334&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40334&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40334&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40334&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40334&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40334&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40334&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40334&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40334&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40334&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40334&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40334&r=mysqlcfg