← All docs

empty() — internals

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

empty() — internals

Where it lives

Lowering notes

  • Lowers empty() for concrete scalar and array-like operands.

Semantic descriptor

Shared contract with a dedicated compiler language-construct implementation.

EIR and runtime boundary

  • Concrete helpers referenced directly by this lowering:
    • __rt_mixed_is_empty

Signature summary

function empty(mixed $value): bool

What the type checker enforces

  • Arity: takes exactly 1 argument.

Eval interpreter (magician)

Cross-references