← All docs

array_filter() — internals

Compiler internals for array_filter(): lowering path, type checks, and runtime helpers.

array_filter() — internals

Where it lives

Lowering notes

  • Lowers array_filter() for static and first-class callbacks through the runtime helper.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_array_filter
  • __rt_array_filter_refcounted

Signature summary

function array_filter(array $array, callable $callback = null, int $mode = 0): array

What the type checker enforces

  • Arity: takes 1–3 arguments (2 optional).

Eval interpreter (magician)

Cross-references