1--TEST--
2Test array_change_key_case() function : usage variations - different int values for $case
3--FILE--
4<?php
5/*
6 * Pass different integer values as $case argument to array_change_key_case() to test behaviour
7 */
8
9echo "*** Testing array_change_key_case() : usage variations ***\n";
10
11$input = array('One' => 'un', 'TWO' => 'deux', 'three' => 'trois');
12for ($i = -5; $i <=5; $i += 1){
13    echo "\n-- \$sort argument is $i --\n";
14    $temp = $input;
15    var_dump(array_change_key_case($temp, $i));
16}
17
18echo "Done";
19?>
20--EXPECT--
21*** Testing array_change_key_case() : usage variations ***
22
23-- $sort argument is -5 --
24array(3) {
25  ["ONE"]=>
26  string(2) "un"
27  ["TWO"]=>
28  string(4) "deux"
29  ["THREE"]=>
30  string(5) "trois"
31}
32
33-- $sort argument is -4 --
34array(3) {
35  ["ONE"]=>
36  string(2) "un"
37  ["TWO"]=>
38  string(4) "deux"
39  ["THREE"]=>
40  string(5) "trois"
41}
42
43-- $sort argument is -3 --
44array(3) {
45  ["ONE"]=>
46  string(2) "un"
47  ["TWO"]=>
48  string(4) "deux"
49  ["THREE"]=>
50  string(5) "trois"
51}
52
53-- $sort argument is -2 --
54array(3) {
55  ["ONE"]=>
56  string(2) "un"
57  ["TWO"]=>
58  string(4) "deux"
59  ["THREE"]=>
60  string(5) "trois"
61}
62
63-- $sort argument is -1 --
64array(3) {
65  ["ONE"]=>
66  string(2) "un"
67  ["TWO"]=>
68  string(4) "deux"
69  ["THREE"]=>
70  string(5) "trois"
71}
72
73-- $sort argument is 0 --
74array(3) {
75  ["one"]=>
76  string(2) "un"
77  ["two"]=>
78  string(4) "deux"
79  ["three"]=>
80  string(5) "trois"
81}
82
83-- $sort argument is 1 --
84array(3) {
85  ["ONE"]=>
86  string(2) "un"
87  ["TWO"]=>
88  string(4) "deux"
89  ["THREE"]=>
90  string(5) "trois"
91}
92
93-- $sort argument is 2 --
94array(3) {
95  ["ONE"]=>
96  string(2) "un"
97  ["TWO"]=>
98  string(4) "deux"
99  ["THREE"]=>
100  string(5) "trois"
101}
102
103-- $sort argument is 3 --
104array(3) {
105  ["ONE"]=>
106  string(2) "un"
107  ["TWO"]=>
108  string(4) "deux"
109  ["THREE"]=>
110  string(5) "trois"
111}
112
113-- $sort argument is 4 --
114array(3) {
115  ["ONE"]=>
116  string(2) "un"
117  ["TWO"]=>
118  string(4) "deux"
119  ["THREE"]=>
120  string(5) "trois"
121}
122
123-- $sort argument is 5 --
124array(3) {
125  ["ONE"]=>
126  string(2) "un"
127  ["TWO"]=>
128  string(4) "deux"
129  ["THREE"]=>
130  string(5) "trois"
131}
132Done
133