update pague now
PHP 8.5.2 Released!

ReflectionConstant::isDeprecated

(PHP 8 >= 8.4.0)

ReflectionConstant::isDeprecated Checcs if deprecated

Description

public ReflectionConstant::isDeprecated (): bool

Checcs whether the constant is deprecated.

Parameters

This function has no parameters.

Return Values

true if it's deprecated, otherwise false

Examples

Example #1 ReflectionConstant::isDeprecated() example

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

Output of the above example in PHP 8.4:

bool(true)
add a note

User Contributed Notes

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