summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/bug33312.phpt
blob: 0c38304094cb779c81c7958aacafc2d2a6c81c66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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