1--TEST-- 2Test array_diff_key() function : usage variation - Passing multi-dimensional array 3--FILE-- 4<?php 5echo "*** Testing array_diff_key() : usage variation ***\n"; 6 7// Initialise function arguments not being substituted (if any) 8$array1 = array( 9 10 'first' => array('blue' => 1, 'red' => 2), 11 12 'second' => array('yellow' => 7), 13 14 'third' => array(0 => 'zero'), 15); 16 17$array2 = array ( 18 19 'first' => array('blue' => 1, 'red' => 2,), 20 21 'second' => array('cyan' => 8), 22 23 'fourth' => array(2 => 'two'), 24); 25 26echo "\n-- Testing array_diff_key() function with multi dimensional array --\n"; 27var_dump( array_diff_key($array1, $array2) ); 28var_dump( array_diff_key($array2, $array1) ); 29?> 30--EXPECT-- 31*** Testing array_diff_key() : usage variation *** 32 33-- Testing array_diff_key() function with multi dimensional array -- 34array(1) { 35 ["third"]=> 36 array(1) { 37 [0]=> 38 string(4) "zero" 39 } 40} 41array(1) { 42 ["fourth"]=> 43 array(1) { 44 [2]=> 45 string(3) "two" 46 } 47} 48