← All docs

defined()

Checks whether a given named constant exists.

defined()

function defined(string $constant_name): bool

Checks whether a given named constant exists.

Parameters:

  • $constant_name (string)

Returns: bool

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how defined is implemented in the compiler, see the internals page.