php8.5
Home/ Manual/ reflection / reflectionfunctionabstract/ ReflectionFunctionAbstract::isDeprecated

ReflectionFunctionAbstract::isDeprecated

PHP function Edit on GitHub ✎

(PHP 5 >= 5.2.0, PHP 7, PHP 8)

Checks if deprecated

Description

ReflectionFunctionAbstract::isDeprecated(): bool

Checks whether the function is deprecated.

Parameters Parameters

Return Values

true if it's deprecated, otherwise false

Examples

ReflectionFunctionAbstract::isDeprecated example

php
<?php
$rf = new ReflectionFunction('ereg');
var_dump($rf->isDeprecated());
?>

The above example will output:

output
bool(true)

See Also

  • Deprecated
  • ReflectionFunctionAbstract::getDocComment

Source: reference/reflection/reflectionfunctionabstract/isdeprecated.xml · from the official PHP manual (php/doc-en)