mirror of
https://github.com/php/php-src.git
synced 2024-12-17 22:09:12 +08:00
0d7a638866
As per RFC: https://wiki.php.net/rfc/variadics
22 lines
523 B
PHP
22 lines
523 B
PHP
--TEST--
|
|
ReflectionParameter::__toString()
|
|
--CREDITS--
|
|
Stefan Koopmanschap <stefan@stefankoopmanschap.nl>
|
|
--FILE--
|
|
<?php
|
|
function ReflectionParameterTest($test, $test2 = null, ...$test3) {
|
|
echo $test;
|
|
}
|
|
$reflect = new ReflectionFunction('ReflectionParameterTest');
|
|
$params = $reflect->getParameters();
|
|
foreach($params as $key => $value) {
|
|
echo $value->__toString() . "\n";
|
|
}
|
|
?>
|
|
==DONE==
|
|
--EXPECT--
|
|
Parameter #0 [ <required> $test ]
|
|
Parameter #1 [ <optional> $test2 = NULL ]
|
|
Parameter #2 [ <optional> ...$test3 ]
|
|
==DONE==
|