1--TEST-- 2Test array_unique() function : usage variations - two dimensional arrays 3--FILE-- 4<?php 5/* 6 * Testing the functionality of array_unique() by passing 7 * two dimensional arrays for $input argument. 8*/ 9 10echo "*** Testing array_unique() : two dimensional array for \$input argument ***\n"; 11 12// initialize the 2-d array 13$input = array( 14 array(1, 2, 3, 1), 15 array("hello", "world", "str1" => "hello", "str2" => 'world'), 16 array(1 => "one", 2 => "two", "one", 'two'), 17 array(1, 2, 3, 1) 18); 19 20var_dump( array_unique($input, SORT_STRING) ); 21 22echo "Done"; 23?> 24--EXPECTF-- 25*** Testing array_unique() : two dimensional array for $input argument *** 26 27Warning: Array to string conversion in %s on line %d 28 29Warning: Array to string conversion in %s on line %d 30 31Warning: Array to string conversion in %s on line %d 32 33Warning: Array to string conversion in %s on line %d 34array(1) { 35 [0]=> 36 array(4) { 37 [0]=> 38 int(1) 39 [1]=> 40 int(2) 41 [2]=> 42 int(3) 43 [3]=> 44 int(1) 45 } 46} 47Done 48