Menu Riverview Church

ARRAY_INTERSECT_UKEY

Computes the intersection of arrays using a callback function on the keys for comparison

SYNTAX

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

PARAMETERS

array1

The array with master values to check.

array2

An array to compare values against.

...

A variable list of arrays to compare.

key_compare_func

The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.

RETURN

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

EXAMPLES

ARRAY1 ARRAY2 KEY_COMPARE_FUNC

Array
(
    [a] => 0
    [b] => 1
)

...

Array
(
    [a] => 0
    [b] => 1
)

PHP