ReflectionClassConstant::hasType

(PHP 8 >= 8.3.0)

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

説明

public function ReflectionClassConstant::hasType(): bool

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

パラメータ

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

戻り値

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

参考

User Contributed Notes

There are no user contributed notes for this page.
Adding new notes is disabled. Please see the links in the Found A Problem? section.
To Top