From: n dot escuder at intra-links dot com
Operating system: Linux
PHP version: 5CVS-2005-06-17 (dev)
PHP Bug Type: Arrays related
Bug description: array_reverse don't work after natsort
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 bug report at http://bugs.php.net/?id=33382&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33382&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=33382&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=33382&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33382&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33382&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33382&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33382&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33382&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33382&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33382&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=33382&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=33382&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33382&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33382&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33382&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33382&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33382&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33382&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33382&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33382&r=mysqlcfg