1--TEST--
2Test array_merge() function : usage variations - numeric keys
3--FILE--
4<?php
5/*
6 * Pass array_merge() arrays with only numeric keys to test behaviour.
7 * $arr2 contains a duplicate element to $arr1.
8 */
9
10echo "*** Testing array_merge() : usage variations ***\n";
11
12//numeric keys
13$arr1 = array('zero', 'one', 'two', 'three');
14$arr2 = array(1 => 'one', 20 => 'twenty', 30 => 'thirty');
15
16var_dump(array_merge($arr1, $arr2));
17var_dump(array_merge($arr2, $arr1));
18
19echo "Done";
20?>
21--EXPECT--
22*** Testing array_merge() : usage variations ***
23array(7) {
24  [0]=>
25  string(4) "zero"
26  [1]=>
27  string(3) "one"
28  [2]=>
29  string(3) "two"
30  [3]=>
31  string(5) "three"
32  [4]=>
33  string(3) "one"
34  [5]=>
35  string(6) "twenty"
36  [6]=>
37  string(6) "thirty"
38}
39array(7) {
40  [0]=>
41  string(3) "one"
42  [1]=>
43  string(6) "twenty"
44  [2]=>
45  string(6) "thirty"
46  [3]=>
47  string(4) "zero"
48  [4]=>
49  string(3) "one"
50  [5]=>
51  string(3) "two"
52  [6]=>
53  string(5) "three"
54}
55Done
56