ReflectionFunctionAbstract::getStaticVariables

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

ReflectionFunctionAbstract::getStaticVariablesПолучает статические переменные

Описание

public ReflectionFunctionAbstract::getStaticVariables(): array

Получение статических переменных.

Список параметров

У этой функции нет параметров.

Возвращаемые значения

Массив (array) статических переменных.

Смотрите также

Добавить

Примечания пользователей 1 note

up
4
Martiros Aghajanyan
10 years ago
<?phpfunction test(){    static $a = 0, $b = 15;    $a++;    $b++;    return $a;}$rf = new ReflectionFunction('test');// result - Array ( [a] => 0 [b] => 15 ) print_r( $rf->getStaticVariables() );//call test function and print again static variablestest();// result - Array ( [a] => 1 [b] => 16 ) print_r( $rf->getStaticVariables() );?>
To Top