mirror of
https://github.com/php/php-src.git
synced 2024-10-17 22:42:38 +00:00
21 lines
408 B
Plaintext
21 lines
408 B
Plaintext
|
--TEST--
|
||
|
Bug #33312 (ReflectionParameter methods do not work correctly)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
class Foo {
|
||
|
public function bar(Foo $foo, $bar = 'bar') {
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$class = new ReflectionClass('Foo');
|
||
|
$method = $class->getMethod('bar');
|
||
|
|
||
|
foreach ($method->getParameters() as $parameter) {
|
||
|
if ($parameter->isDefaultValueAvailable()) {
|
||
|
print $parameter->getDefaultValue()."\n";
|
||
|
}
|
||
|
}
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
bar
|