1--TEST-- 2Test array_merge() function : basic functionality 3--FILE-- 4<?php 5/* 6 * Test basic functionality of array_merge() 7 */ 8 9echo "*** Testing array_merge() : basic functionality ***\n"; 10 11//indexed array 12$array1 = array ('zero', 'one', 'two'); 13//associative array 14$array2 = array ('a' => 1, 'b' => 2, 'c' => 3); 15 16var_dump(array_merge($array1, $array2)); 17 18var_dump(array_merge($array2, $array1)); 19 20echo "Done"; 21?> 22--EXPECT-- 23*** Testing array_merge() : basic functionality *** 24array(6) { 25 [0]=> 26 string(4) "zero" 27 [1]=> 28 string(3) "one" 29 [2]=> 30 string(3) "two" 31 ["a"]=> 32 int(1) 33 ["b"]=> 34 int(2) 35 ["c"]=> 36 int(3) 37} 38array(6) { 39 ["a"]=> 40 int(1) 41 ["b"]=> 42 int(2) 43 ["c"]=> 44 int(3) 45 [0]=> 46 string(4) "zero" 47 [1]=> 48 string(3) "one" 49 [2]=> 50 string(3) "two" 51} 52Done 53