#33382 [Asn->Csd]: array_reverse don't work after natsort
| From: | tony2001@php.net | Date: | Fri, 17 Jun 2005 10:53:26 +0000 |
| Subject: | #33382 [Asn->Csd]: array_reverse don't work after natsort | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-80532@lists.php.net to get a copy of this message | ||
ID: 33382
Updated by: tony2001@php.net
Reported By: n dot escuder at intra-links dot com
-Status: Assigned
+Status: Closed
Bug Type: Arrays related
Operating System: Linux
PHP Version: 5CVS-2005-06-17 (dev)
Assigned To: tony2001
New Comment:
This bug has been fixed in CVS.
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/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-06-17 12:40:14] tony2001@php.net
Assigning to myself.
Patch pending.
------------------------------------------------------------------------
[2005-06-17 10:49:57] n dot escuder at intra-links dot com
Description:
------------
A bug occur after doing a natsort and an array_reverse.
after the natsort all seem to be good but after array_reverse not.
If we don't use natsort all work fine.
Reproduce code:
---------------
<?
$test = array ("/", "/mnt", "/tmp");
natsort($test);
print_r($test);
$test = array_reverse($test);
print_r($test);
?>
Expected result:
----------------
Array
(
[0] => /
[1] => /mnt
[2] => /tmp
)
Array
(
[0] => /tmp
[1] => /mnt
[2] => /
)
Actual result:
--------------
Array
(
[0] => /
[1] => /mnt
[2] => /tmp
)
Array
(
[0] => /tmp
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33382&edit=1