← All docs

wordwrap() — internals

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

wordwrap() — internals

Where it lives

Lowering notes

  • Lowers wordwrap(string, width?, break?, cut?) through the shared runtime helper.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_str_pad
  • __rt_wordwrap

Signature summary

function wordwrap(string $string, int $width = 75, string $break = '\n', bool $cut_long_words = false): string

What the type checker enforces

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

Eval interpreter (magician)

Cross-references