← All docs
date_default_timezone_set() — internals
Compiler internals for date_default_timezone_set(): lowering path, type checks, and runtime helpers.
date_default_timezone_set() — internals
Where it lives
- Signature:
src/builtins/system/date_default_timezone_set.rs - Lowering:
src/codegen/lower_inst/builtins/system.rs:84 (lower_date_default_timezone_set) - Function symbol:
lower_date_default_timezone_set()
Lowering notes
- Lowers
date_default_timezone_set(timezoneId)through the shared runtime helper. - Materializes the identifier string into the registers the helper reads (ptr/len in
x1/x2on ARM64,rax/rdxon x86_64), then__rt_date_default_timezone_set- applies it via libc
putenv+tzsetand returns PHPtruein the integer-result register.
Runtime helpers
The following runtime helpers are referenced:
__rt_date_default_timezone_set__rt_microtime__rt_microtime_mixed__rt_microtime_str
Signature summary
function date_default_timezone_set(string $timezoneId): bool
What the type checker enforces
- Arity: takes exactly 1 argument.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/time/date_default_timezone_set.rs(eval_builtin!) - Dispatch hooks:
direct,values