← All docs

substr_replace() — internals

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

substr_replace() — internals

Where it lives

Lowering notes

  • Lowers substr_replace(string, replacement, start, length?).

Runtime helpers

The following runtime helpers are referenced:

  • __rt_str_repeat
  • __rt_substr_replace

Signature summary

function substr_replace(string $string, string $replace, int $offset, int $length = null): string

What the type checker enforces

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

Eval interpreter (magician)

Cross-references