1--TEST--
2Test array_reverse() function : basic functionality - associative array for 'array' argument
3--FILE--
4<?php
5/*
6 * Testing array_reverse() with associative array for $array argument
7*/
8
9echo "*** Testing array_reverse() : basic functionality ***\n";
10
11// Initialise the array
12$array = array("a" => "hello", 123 => "number", 'string' => 'blue', "10" => 13.33);
13
14// Calling array_reverse() with default arguments
15var_dump( array_reverse($array) );
16
17// Calling array_reverse() with all possible arguments
18var_dump( array_reverse($array, true) );  // expects the keys to be preserved
19var_dump( array_reverse($array, false) );  // expects the keys not to be preserved
20
21echo "Done";
22?>
23--EXPECT--
24*** Testing array_reverse() : basic functionality ***
25array(4) {
26  [0]=>
27  float(13.33)
28  ["string"]=>
29  string(4) "blue"
30  [1]=>
31  string(6) "number"
32  ["a"]=>
33  string(5) "hello"
34}
35array(4) {
36  [10]=>
37  float(13.33)
38  ["string"]=>
39  string(4) "blue"
40  [123]=>
41  string(6) "number"
42  ["a"]=>
43  string(5) "hello"
44}
45array(4) {
46  [0]=>
47  float(13.33)
48  ["string"]=>
49  string(4) "blue"
50  [1]=>
51  string(6) "number"
52  ["a"]=>
53  string(5) "hello"
54}
55Done
56