1--TEST-- 2array_diff_ukey() : Basic test. 3--FILE-- 4<?php 5/* 6* proto array array_diff_ukey ( array $array1, array $array2 [, array $ ..., callback $key_compare_func] ) 7* Function is implemented in ext/standard/array.c 8*/ 9function key_compare_func($key1, $key2) { 10 if ($key1 == $key2) return 0; 11 else if ($key1 > $key2) return 1; 12 else return -1; 13} 14$array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); 15$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); 16var_dump(array_diff_ukey($array1, $array2, 'key_compare_func')); 17?> 18--EXPECT-- 19array(2) { 20 ["red"]=> 21 int(2) 22 ["purple"]=> 23 int(4) 24} 25