get_defined_constants()
function get_defined_constants(bool $categorize = false): array
Returns constants visible to the current program.
Parameters:
$categorize(bool), defaultfalse, optional
Returns: array
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported through a declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/core/get_defined_constants.rs).
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how get_defined_constants is implemented in the compiler, see the internals page.