Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<ReflectionConstant::getValueReflectionConstant::__toString>
^ReflectionConstantLast updated: Mon, 26 Oct 2026

ReflectionConstant::isDeprecated

(PHP 8 >= 8.4.0)

ReflectionConstant::isDeprecated — Checks if deprecated

Description

public function ReflectionConstant::isDeprecated(): bool

Checks 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)

<ReflectionConstant::getValueReflectionConstant::__toString>
^ReflectionConstantLast updated: Mon, 26 Oct 2026