← All docs

array_intersect()

Computes the intersection of arrays.

array_intersect()

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

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