« ReflectionClassConstant::getValue
ReflectionClassConstant::isDeprecated »

ReflectionClassConstant::hasType

(PHP 8 >= 8.3.0)

ReflectionClassConstant::hasType — クラス定数に型が指定されているかを調べる

説明

public function ReflectionClassConstant::hasType(): bool

クラス定数に、型が関連付けられているかを調べます。

パラメータ

この関数にはパラメータはありません。

戻り値

型が指定されている場合は、true を返します。 指定されていない場合は、false を返します。

参考

関連キーワード:
ReflectionClassConstant   定数   hasType   getValue   isDeprecated   関連   参考   getType   ReflectionType
関連する関数・ページ:
reflectionclassconstant.gettype   reflectionclassconstant.getvalue   reflectionclassconstant.ispublic   reflectionclassconstant.getname   reflectionclassconstant.isfinal   reflectionclassconstant.construct