mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
3709e74b5e
Closes GH-5353. From now on, PHP will have reflection information about default values of parameters of internal functions. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
18 lines
478 B
PHP
18 lines
478 B
PHP
--TEST--
|
|
ReflectionParameter::__toString()
|
|
--CREDITS--
|
|
Stefan Koopmanschap <stefan@stefankoopmanschap.nl>
|
|
--FILE--
|
|
<?php
|
|
function ReflectionParameterTest($test, $test2 = null) {
|
|
echo $test;
|
|
}
|
|
$reflect = new ReflectionFunction('ReflectionParameterTest');
|
|
foreach($reflect->getParameters() as $key => $value) {
|
|
echo new ReflectionParameter('ReflectionParameterTest', $key), "\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Parameter #0 [ <required> $test ]
|
|
Parameter #1 [ <optional> $test2 = NULL ]
|