2008-06-12 21:41:09 +00:00
|
|
|
--TEST--
|
|
|
|
ReflectionParameter::__toString()
|
|
|
|
--CREDITS--
|
|
|
|
Stefan Koopmanschap <stefan@stefankoopmanschap.nl>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
2013-09-26 16:39:17 +00:00
|
|
|
function ReflectionParameterTest($test, $test2 = null, ...$test3) {
|
2008-06-12 21:41:09 +00:00
|
|
|
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 ]
|
2013-09-26 16:39:17 +00:00
|
|
|
Parameter #2 [ <optional> ...$test3 ]
|
2008-06-12 21:41:09 +00:00
|
|
|
==DONE==
|