1--TEST-- 2Test array_merge() function : usage variations - string keys 3--FILE-- 4<?php 5/* 6 * Pass array_merge arrays with string keys to test behaviour. 7 * $arr2 has a duplicate key to $arr1 8 */ 9 10echo "*** Testing array_merge() : usage variations ***\n"; 11 12//string keys 13$arr1 = array('zero' => 'zero', 'one' => 'un', 'two' => 'deux'); 14$arr2 = array('zero' => 'zero', 'un' => 'eins', 'deux' => 'zwei'); 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(5) { 24 ["zero"]=> 25 string(4) "zero" 26 ["one"]=> 27 string(2) "un" 28 ["two"]=> 29 string(4) "deux" 30 ["un"]=> 31 string(4) "eins" 32 ["deux"]=> 33 string(4) "zwei" 34} 35array(5) { 36 ["zero"]=> 37 string(4) "zero" 38 ["un"]=> 39 string(4) "eins" 40 ["deux"]=> 41 string(4) "zwei" 42 ["one"]=> 43 string(2) "un" 44 ["two"]=> 45 string(4) "deux" 46} 47Done 48