#33382 [Opn->Asn]: array_reverse don't work after natsort

From: Date: Fri, 17 Jun 2005 10:40:19 +0000
Subject: #33382 [Opn->Asn]: array_reverse don't work after natsort
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-80530@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: Open +Status: Assigned Bug Type: Arrays related Operating System: Linux PHP Version: 5CVS-2005-06-17 (dev) -Assigned To: +Assigned To: tony2001 New Comment: Assigning to myself. Patch pending. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#80530) next »