ReflectionClass::hasConstant

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

Description

public function hasConstant(
  string $name,
): bool

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

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

Parameters

  • string $name

Return Values

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