1--TEST--
2Test array_multisort() function : basic functionality
3--FILE--
4<?php
5/* Prototype  : bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING|SORT_NATURAL|SORT_FLAG_CASE]] [, array ar2 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING|SORT_NATURAL|SORT_FLAG_CASE]], ...])
6 * Description: Sort multiple arrays at once similar to how ORDER BY clause works in SQL
7 * Source code: ext/standard/array.c
8 * Alias to functions:
9 */
10
11echo "*** Testing array_multisort() : basic functionality - renumbering of numeric keys ***\n";
12
13// Initialise all required variables
14$ar1 = array( "strkey" => 2,  1,  9 => 1);
15$ar2 = array( 2, "aa" , "1");
16
17echo "\n-- Testing array_multisort() function with all normal arguments --\n";
18var_dump( array_multisort($ar1, SORT_ASC, SORT_REGULAR, $ar2, SORT_ASC, SORT_NUMERIC) );
19var_dump($ar1, $ar2);
20
21?>
22===DONE===
23--EXPECTF--
24*** Testing array_multisort() : basic functionality - renumbering of numeric keys ***
25
26-- Testing array_multisort() function with all normal arguments --
27bool(true)
28array(3) {
29  [0]=>
30  int(1)
31  [1]=>
32  int(1)
33  ["strkey"]=>
34  int(2)
35}
36array(3) {
37  [0]=>
38  string(2) "aa"
39  [1]=>
40  string(1) "1"
41  [2]=>
42  int(2)
43}
44===DONE===