← All docs

checkdate() — internals

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

checkdate() — internals

Where it lives

Lowering notes

  • Lowers checkdate(month, day, year) through the shared Gregorian-validation runtime helper.
  • Marshals the three integers into the leading ABI argument registers (unboxing any boxed
  • Mixed/Union argument), then calls __rt_checkdate, which returns PHP true/false in the
  • integer result register for a valid/invalid date.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_checkdate
  • __rt_getdate

Signature summary

function checkdate(int $month, int $day, int $year): bool

What the type checker enforces

  • Arity: takes exactly 3 arguments.

Cross-references