ReflectionConstant::isDeprecated

(PHP 8 >= 8.4.0)

ReflectionConstant::isDeprecated非推奨かどうかを調べる

説明

public ReflectionConstant::isDeprecated(): bool

定数が非推奨かどうかを調べます。

パラメータ

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

戻り値

定数が非推奨なら true を、そうでなければ false を返します。

例1 ReflectionConstant::isDeprecated() の例

<?php
// E_STRICT is deprecated as of PHP 8.4
var_dump((new ReflectionConstant('E_STRICT'))->isDeprecated());
?>

上の例の PHP 8.4 での出力は、このようになります。:

bool(true)
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top