← All docs

fprintf() — internals

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

fprintf() — internals

Where it lives

Lowering notes

  • Lowers fprintf(stream, format, values...) as sprintf() plus stream write.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_sprintf

Signature summary

function fprintf(resource $stream, string $format, ...$values): int

What the type checker enforces

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

Eval interpreter (magician)

Cross-references