php-src/ext/reflection/tests/ReflectionParameter_toString_basic.phpt
2013-09-26 18:39:17 +02:00

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==