← All docs

clamp() — internals

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

clamp() — internals

Where it lives

Lowering notes

  • Lowers numeric clamp(value, min, max) calls with PHP-compatible bound checks.

Runtime helpers

No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.

Signature summary

function clamp(int $value, int $min, int $max): mixed

What the type checker enforces

  • Arity: takes exactly 3 arguments.

Eval interpreter (magician)

Cross-references