The PHP `defined()` function checks whether a constant is defined. It supports checking by name or namespace, but requires proper quoting — passing the constant's value instead of its name returns false. Aliased constant names created with `use` are not recognized. For class constants, a string with the class name and `::` separator can be used, and visibility rules apply.

Sort: