ReflectionClass::hasConstant

( excerpt from http://php.net/manual/en/reflectionclass.hasconstant.php )

public function hasConstant(
  string $name,
): bool;

Checks whether the class has a specific constant defined or not.

Parameters

  • string $name

Returns

  • bool - TRUE if the constant is defined, otherwise FALSE.