← All docs

preg_replace_callback() — internals

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

preg_replace_callback() — internals

Where it lives

Lowering notes

  • Lowers preg_replace_callback(pattern, callback, subject) through supported direct callbacks.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_preg_replace_callback

Signature summary

function preg_replace_callback(string $pattern, callable $callback, string $subject): string

What the type checker enforces

  • Arity: takes exactly 3 arguments.

Eval interpreter (magician)

Cross-references