1--TEST--
2Test array_multisort() function : case-insensitive
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() : case-insensitive\n";
12
13$a = array(
14	'Second',
15	'First.1',
16	'First.2',
17	'First.3',
18	'Twentieth',
19	'Tenth',
20	'Third',
21);
22
23$b = array(
24	'2 a',
25	'1 bb 1',
26	'1 bB 2',
27	'1 BB 3',
28	'20 c',
29	'10 d',
30	'3 e',
31);
32
33array_multisort($b, SORT_STRING | SORT_FLAG_CASE, $a);
34
35var_dump($a, $b);
36
37?>
38===DONE===
39--EXPECTF--
40*** Testing array_multisort() : case-insensitive
41array(7) {
42  [0]=>
43  string(7) "First.1"
44  [1]=>
45  string(7) "First.2"
46  [2]=>
47  string(7) "First.3"
48  [3]=>
49  string(5) "Tenth"
50  [4]=>
51  string(6) "Second"
52  [5]=>
53  string(9) "Twentieth"
54  [6]=>
55  string(5) "Third"
56}
57array(7) {
58  [0]=>
59  string(6) "1 bb 1"
60  [1]=>
61  string(6) "1 bB 2"
62  [2]=>
63  string(6) "1 BB 3"
64  [3]=>
65  string(4) "10 d"
66  [4]=>
67  string(3) "2 a"
68  [5]=>
69  string(4) "20 c"
70  [6]=>
71  string(3) "3 e"
72}
73===DONE===
74