Annotation of embedaddon/php/ext/reflection/tests/bug33312.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Reflection Bug #33312 (ReflectionParameter methods do not work correctly)
        !             3: --FILE--
        !             4: <?php
        !             5: class Foo {
        !             6:     public function bar(Foo $foo, $bar = 'bar') {
        !             7:     }
        !             8: }
        !             9: 
        !            10: $class = new ReflectionClass('Foo');
        !            11: $method = $class->getMethod('bar');
        !            12: 
        !            13: foreach ($method->getParameters() as $parameter) {
        !            14:     if ($parameter->isDefaultValueAvailable()) {
        !            15:         print $parameter->getDefaultValue()."\n";
        !            16:     }
        !            17: }
        !            18: ?>
        !            19: --EXPECT--
        !            20: bar

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>