1--TEST-- 2Test array_multisort() function : basic functionality 3--FILE-- 4<?php 5echo "*** Testing array_multisort() : basic functionality ***\n"; 6 7// Initialise all required variables 8$ar1 = array("row1" => 2, "row2" => 1, "row3" => 1); 9$ar2 = array("row1" => 2, "row2" => "aa", "row3" => "1"); 10 11echo "\n-- Testing array_multisort() function with all normal arguments --\n"; 12var_dump( array_multisort($ar1, SORT_ASC, SORT_REGULAR, $ar2, SORT_DESC, SORT_STRING) ); 13var_dump($ar1, $ar2); 14 15echo "\n-- Testing array_multisort() function with one argument --\n"; 16var_dump( array_multisort($ar2) ); 17var_dump($ar2); 18 19 20?> 21--EXPECT-- 22*** Testing array_multisort() : basic functionality *** 23 24-- Testing array_multisort() function with all normal arguments -- 25bool(true) 26array(3) { 27 ["row2"]=> 28 int(1) 29 ["row3"]=> 30 int(1) 31 ["row1"]=> 32 int(2) 33} 34array(3) { 35 ["row2"]=> 36 string(2) "aa" 37 ["row3"]=> 38 string(1) "1" 39 ["row1"]=> 40 int(2) 41} 42 43-- Testing array_multisort() function with one argument -- 44bool(true) 45array(3) { 46 ["row3"]=> 47 string(1) "1" 48 ["row1"]=> 49 int(2) 50 ["row2"]=> 51 string(2) "aa" 52} 53