← All docs
in_array() — internals
Compiler internals for in_array(): lowering path, type checks, and runtime helpers.
in_array() — internals
Where it lives
- Signature:
src/builtins/array/in_array.rs - Lowering:
src/codegen/lower_inst/builtins/arrays.rs:1786 (lower_in_array) - Function symbol:
lower_in_array()
Lowering notes
- Lowers
in_array()for indexed and associative arrays with PHP loose or strict membership.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function in_array(mixed $needle, array $haystack, bool $strict = false): bool
What the type checker enforces
- Arity: takes 2–3 arguments (1 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/array/in_array.rs(eval_builtin!) - Dispatch hooks:
direct,values