array_intersect_ukey — 用回调函数比较键名来计算数组的交集

 

说明

array_intersect_ukey ( array $array1 , array $array2 [, array $... ], callable $key_compare_func ) : array

array_intersect_ukey() 返回一个数组,该数组包含了所有出现在 array1 中并同时出现在所有其它参数数组中的键名的值。深圳dd马达

参数

 

array1

Initial array for comparison of the arrays.

array2

First array to compare keys against.

...

Variable list of array arguments to compare keys against.

key_compare_func

在第一个参数小于,等于或大于第二个参数时,该比较函数必须相应地返回一个小于,等于或大于 0 的整数。

callback ( mixed $a, mixed $b ) : int

返回值

Returns the values of array1 whose keys exist in all the arguments. 

原文地址:https://www.cnblogs.com/furuihua/p/12859207.html