← All docs
hash_init() — internals
Compiler internals for hash_init(): lowering path, type checks, and runtime helpers.
hash_init() — internals
Where it lives
- Signature:
src/builtins/string/hash_init.rs - Lowering:
src/codegen/lower_inst/builtins/strings.rs:283 (lower_hash_init) - Function symbol:
lower_hash_init()
Lowering notes
- Lowers
hash_init(algo)and returns a boxed HashContext resource.
Runtime helpers
The following runtime helpers are referenced:
__rt_hash_init
Signature summary
function hash_init(string $algo, int $flags = 0, string $key = ''): mixed
What the type checker enforces
- Arity: takes 1–3 arguments (2 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/string/hash_init.rs(eval_builtin!) - Dispatch hooks:
direct,values