← All docs

array_diff_key()

Computes the difference of arrays using keys for comparison.

array_diff_key()

function array_diff_key(array $array, ...$arrays): array

Computes the difference of arrays using keys for comparison.

Parameters:

  • $array (array)
  • ...$arrays — variadic: collects excess arguments into $arrays.

Returns: array

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how array_diff_key is implemented in the compiler, see the internals page.