« ReflectionClassConstant::getName
ReflectionClassConstant::getValue »

ReflectionClassConstant::getType

(PHP 8 >= 8.3.0)

ReflectionClassConstant::getType — クラス定数の型を取得する

説明

public function ReflectionClassConstant::getType(): ?ReflectionType

クラス定数に関連付けられた型を取得します。

パラメータ

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

戻り値

定数に型が指定されている場合、ReflectionType を返します。 指定されていない場合は、null を返します。

参考

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