php8.5
Home/ Manual/ reflection / reflectionclass/ ReflectionClass::getReflectionConstant

ReflectionClass::getReflectionConstant

PHP function Edit on GitHub ✎

(PHP 7 >= 7.1.0, PHP 8)

Gets a ReflectionClassConstant for a class's constant

Description

ReflectionClass::getReflectionConstant(string $name): ReflectionClassConstant|false

Gets a ReflectionClassConstant for a class's constant.

Parameters

name

The class constant name.

Return Values

A ReflectionClassConstant, Falseforfailure.

See Also

  • ReflectionClass::getReflectionConstants
  • ReflectionClassConstant

Source: reference/reflection/reflectionclass/getreflectionconstant.xml · from the official PHP manual (php/doc-en)