|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-02-26 21:40 UTC] yohgaki@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 18:00:01 2025 UTC |
Here's a quick script to reproduce the problem: <? $x = array ("filename" => array (0 => "joe.doc", 1 => "ralph.doc", 2 => "maria.xls") , "size" => array (0 => "jbig", 1 => "rsmall", 2 => "mmed") , "modified" => array (0 => "54", 1 => "32", 2 => "99") ); # array_multisort ($x["modified"]); asort ($x["modified"]); reset ($x["modified"]); echo "<p><b>Values in x</b><br>"; while (list ($key, $val) = each ($x)) { echo "$key => $val<br>"; } echo "<p><b>Values in filename</b><br>"; while (list ($key, $val) = each ($x["filename"])) { echo "$key => $val<br>"; } echo "<p><b>Values in size</b><br>"; while (list ($key, $val) = each ($x["size"])) { echo "$key => $val<br>"; } echo "<p><b>Values in modified</b><br>"; while (list ($key, $val) = each ($x["modified"])) { echo "$key => $val<br>"; } ?> Uncomment the "array_multisort" line and comment the "asort" line to witness the bug first hand.