← All docs

array_diff()

Computes the difference of arrays.

array_diff()

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

Computes the difference of arrays.

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 is implemented in the compiler, see the internals page.