1--TEST--
2Test array_values() function : usage variations - Internal order check
3--FILE--
4<?php
5/*
6 * Check that array_values is re-assigning keys according to the internal order of the array,
7 * and is not dependent on the \$input argument's keys
8 */
9
10echo "*** Testing array_values() : usage variations ***\n";
11
12// populate array with 'default' keys in reverse order
13$input = array(3 => 'three', 2 => 'two', 1 => 'one', 0 => 'zero');
14
15echo "\n-- \$input argument: --\n";
16var_dump($input);
17
18echo "\n-- Result of array_values() --\n";
19var_dump(array_values($input));
20
21echo "Done";
22?>
23--EXPECT--
24*** Testing array_values() : usage variations ***
25
26-- $input argument: --
27array(4) {
28  [3]=>
29  string(5) "three"
30  [2]=>
31  string(3) "two"
32  [1]=>
33  string(3) "one"
34  [0]=>
35  string(4) "zero"
36}
37
38-- Result of array_values() --
39array(4) {
40  [0]=>
41  string(5) "three"
42  [1]=>
43  string(3) "two"
44  [2]=>
45  string(3) "one"
46  [3]=>
47  string(4) "zero"
48}
49Done
50