← All docs
preg_match_all() — internals
Compiler internals for preg_match_all(): lowering path, type checks, and runtime helpers.
preg_match_all() — internals
Where it lives
- Signature:
src/builtins/system/preg_match_all.rs - Lowering:
src/codegen/lower_inst/builtins/regex.rs:66 (lower_preg_match_all) - Function symbol:
lower_preg_match_all()
Lowering notes
- Lowers
preg_match_all(pattern, subject)through the shared regex runtime helper.
Runtime helpers
The following runtime helpers are referenced:
__rt_preg_match_all__rt_preg_replace
Signature summary
function preg_match_all(string $pattern, string $subject): int
What the type checker enforces
- Arity: takes exactly 2 arguments.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/regex/preg_match_all.rs(eval_builtin!) - Dispatch hooks:
direct,values - By-reference parameters:
$matches.