#49003 [NEW]: natsort: sort sequence has changed
| From: | h dot beuttenmueller at gmx dot de | Date: | Tue, 21 Jul 2009 15:01:45 +0000 |
| Subject: | #49003 [NEW]: natsort: sort sequence has changed | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-140016@lists.php.net to get a copy of this message | ||
From: h dot beuttenmueller at gmx dot de
Operating system: winXP SP3
PHP version: 5.2.10
PHP Bug Type: Unknown/Other Function
Bug description: natsort: sort sequence has changed
Description:
------------
If the following example-array was sorted by 'natsort' with PHP-Version
5.2.9-2 and 5.2.10 the resulting sort sequence is different:
Example-Array
[0] => 1_3
[1] => 0_0
[2] => 3_10
[3] => 3_4
[4] => 2_13
natsort - Result with PHP-Version 5.2.9-2
Array
[1] => 0_0
[0] => 1_3
[4] => 2_13
[3] => 3_4
[2] => 3_10
natsort - Result with PHP-Version 5.2.10
Array
[0] => 1_3
[4] => 2_13
[3] => 3_4
[2] => 3_10
[1] => 0_0
Reproduce code:
---------------
#once for PHP-Version 5.2.9-2 and once for 5.2.10
$a = array('1_3','0_0'.'3_10','3_4','2_13');
natsort($a);
print_r($a);
Expected result:
----------------
sort sequence should be the same between both (all:-) versions
--
Edit bug report at http://bugs.php.net/?id=49003&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49003&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49003&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49003&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49003&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49003&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49003&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49003&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49003&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49003&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49003&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49003&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49003&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49003&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49003&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49003&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49003&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49003&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49003&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49003&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49003&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49003&r=mysqlcfg