1--TEST--
2Test array_multisort() function : usage variation - testing with multiple array arguments
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() : Testing  all array sort specifiers ***\n";
12
13$ar = array( 2, "aa" , "1");
14
15array_multisort($ar, SORT_REGULAR, SORT_DESC);
16var_dump($ar);
17
18array_multisort($ar, SORT_STRING, SORT_DESC);
19var_dump($ar);
20
21array_multisort($ar, SORT_NUMERIC, SORT_DESC);
22var_dump($ar);
23
24
25?>
26===DONE===
27--EXPECT--
28*** Testing array_multisort() : Testing  all array sort specifiers ***
29array(3) {
30  [0]=>
31  int(2)
32  [1]=>
33  string(2) "aa"
34  [2]=>
35  string(1) "1"
36}
37array(3) {
38  [0]=>
39  string(2) "aa"
40  [1]=>
41  int(2)
42  [2]=>
43  string(1) "1"
44}
45array(3) {
46  [0]=>
47  int(2)
48  [1]=>
49  string(1) "1"
50  [2]=>
51  string(2) "aa"
52}
53===DONE===
54