(PHP 8 >= 8.3.0)
ReflectionClassConstant::getType — Gets a class constant's type
Gets the associated type of a class constant.
This function has no parameters.
   Returns a ReflectionType object if a parameter type is
   specified, null otherwise.