← All docs

str_pad() — internals

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

str_pad() — internals

Where it lives

Lowering notes

  • Lowers str_pad(string, length, pad_string?, pad_type?) through the shared runtime helper.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_str_pad

Signature summary

function str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = 1): string

What the type checker enforces

  • Arity: takes 2–4 arguments (2 optional).

Eval interpreter (magician)

Cross-references