← All docs

get_defined_constants()

Returns constants visible to the current program.

get_defined_constants()

function get_defined_constants(bool $categorize = false): array

Returns constants visible to the current program.

Parameters:

  • $categorize (bool), default false, optional

Returns: array

Availability

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.