PHP - Manual: ReflectionClassConstant::getType
2025-02-27
(PHP 8 >= 8.3.0)
ReflectionClassConstant::getType — Gets a class constant's type
Gets the associated type of a class constant.
此函数没有参数。
Returns a ReflectionType object if a constant type is
specified, null
otherwise.
官方地址:https://www.php.net/manual/en/reflectionclassconstant.gettype.php