← All docs
interface_exists() — internals
Compiler internals for interface_exists(): lowering path, type checks, and runtime helpers.
interface_exists() — internals
Where it lives
- Signature:
src/builtins/callables/interface_exists.rs - Lowering:
src/codegen/lower_inst/builtins.rs:585 (lower_class_like_exists) - Function symbol:
lower_class_like_exists()
Lowering notes
- Lowers AOT class/interface/enum existence checks for literal or dynamic string names.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function interface_exists(string $interface, bool $autoload = true): bool
What the type checker enforces
- Arity: takes 1–2 arguments (1 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/symbols/interface_exists.rs(eval_builtin!) - Dispatch hooks:
direct,values