ReflectionConstant::isDeprecated

(PHP 8 >= 8.4.0)

ReflectionConstant::isDeprecatedChecks if deprecated

Descrição

public ReflectionConstant::isDeprecated(): bool

Checks whether the constant is deprecated.

Parâmetros

Esta função não possui parâmetros.

Valor Retornado

true if it's deprecated, otherwise false

Exemplos

Exemplo #1 ReflectionConstant::isDeprecated() example

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

Saída do exemplo acima no PHP 8.4:

bool(true)