← All docs
unserialize() — internals
Compiler internals for unserialize(): lowering path, type checks, and runtime helpers.
unserialize() — internals
Where it lives
- Signature:
src/builtins/system/unserialize.rs - Lowering:
src/codegen/lower_inst/builtins/serialize.rs:164 (lower_unserialize) - Function symbol:
lower_unserialize()
Lowering notes
- Lowers
unserialize($data, $options?)into the shared unserialize runtime helper. - The source string is parsed by
__rt_unserialize_mixed; a null result pointer - (parse error or unsupported wire form) is boxed as PHP
false. The optional $optionsargument is accepted but currently ignored.
Runtime helpers
The following runtime helpers are referenced:
__rt_mixed_cast_string__rt_unserialize_begin__rt_unserialize_mixed
Signature summary
function unserialize(string $data, mixed $options = []): mixed
What the type checker enforces
- Arity: takes 1–2 arguments (1 optional).
Eval interpreter (magician)
Not callable from eval’d code — the magician interpreter has no entry for this builtin.