← All docs

printf() — internals

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

printf() — internals

Where it lives

Lowering notes

  • Lowers printf(format, values...) as sprintf() followed by stdout emission.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_sprintf

Signature summary

function printf(string $format, ...$values): int

What the type checker enforces

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

Eval interpreter (magician)

Cross-references