enum_exists()
function enum_exists(string $enum, bool $autoload = true): bool
Checks if the enum has been defined.
Parameters:
$enum(string)$autoload(bool), defaulttrue, optional
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/enum_exists.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how enum_exists is implemented in the compiler, see the internals page.