/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/reflection/tests/ReflectionParameter_getDeclaringFunction_basic.phpt
34 строки
817 B
Máté Kocsis
Store default parameter values of internal functions in arg info
08 апр 2020, 19:37
Не верифицирован
08 апр 2020, 19:37
3709e74
Код
Авторство
О чём код?
--TEST-- ReflectionParameter::getDeclaringFunction() --CREDITS-- Stefan Koopmanschap <stefan@stefankoopmanschap.nl> #testfest roosendaal on 2008-05-10 --FILE-- <?php function ReflectionParameterTest($test, $test2 = null) { echo $test; } $reflect = new ReflectionFunction('ReflectionParameterTest'); $params = $reflect->getParameters(); foreach($params as $key => $value) { echo $value->getDeclaringFunction() . "\n"; } ?> --EXPECTF-- Function [ <user> function ReflectionParameterTest ] { @@ %s.php %d - %d - Parameters [2] { Parameter #0 [ <required> $test ] Parameter #1 [ <optional> $test2 = NULL ] } } Function [ <user> function ReflectionParameterTest ] { @@ %s.php %d - %d - Parameters [2] { Parameter #0 [ <required> $test ] Parameter #1 [ <optional> $test2 = NULL ] } }