/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_toString_Internal.phpt
28 строк
807 B
Derick Rethans
Another pass of improving ext/date argument names
26 июл 2020, 12:38
26 июл 2020, 12:38
f66627a
Код
Авторство
О чём код?
--TEST-- ReflectionParameter::__toString() should display default values for internal functions as well --FILE-- <?php $class = new ReflectionClass('DateTime'); $method = $class->getMethod('setTime'); foreach ($method->getParameters() as $k => $parameter) { echo $parameter . "\n"; } echo "----------\n"; $class = new ReflectionClass('DateTimeZone'); $method = $class->getMethod('listIdentifiers'); foreach ($method->getParameters() as $parameter) { echo $parameter . "\n"; } ?> --EXPECT-- Parameter #0 [ <required> int $hour ] Parameter #1 [ <required> int $minute ] Parameter #2 [ <optional> int $second = 0 ] Parameter #3 [ <optional> int $microsecond = 0 ] ---------- Parameter #0 [ <optional> int $timezoneGroup = DateTimeZone::ALL ] Parameter #1 [ <optional> ?string $countryCode = null ]