← All docs

call_user_func() — internals

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

call_user_func() — internals

Where it lives

Lowering notes

  • Rejects call_user_func* calls that escaped the dedicated EIR callback lowering path.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_array_product
  • __rt_array_sum

Signature summary

function call_user_func(callable $callback, ...$args): mixed

What the type checker enforces

  • Arity: takes exactly 1 argument.
  • Variadic: collects excess arguments into $args.

Eval interpreter (magician)

Cross-references