method_exists()
function method_exists(mixed $object_or_class, string $method): bool
Checks whether a class method exists.
Parameters:
$object_or_class(mixed)$method(string)
Returns: bool
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/symbols/method_exists.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how method_exists is implemented in the compiler, see the internals page.