ID:               49003
 Updated by:       j...@php.net
 Reported By:      h dot beuttenmueller at gmx dot de
-Status:           Open
+Status:           Feedback
-Bug Type:         Unknown/Other Function
+Bug Type:         Strings related
 Operating System: winXP SP3
 PHP Version:      5.2.10
 New Comment:

Please try using this snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




Previous Comments:
------------------------------------------------------------------------

[2009-07-21 15:01:45] h dot beuttenmueller at gmx dot de

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 this bug report at http://bugs.php.net/?id=49003&edit=1

Reply via email to