Annotation of embedaddon/php/ext/reflection/tests/bug62715.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #62715 (ReflectionParameter::isDefaultValueAvailable() wrong result)
                      3: --FILE--
                      4: <?php
                      5: 
                      6: function test(PDO $a = null, $b = 0, array $c) {}
                      7: $r = new ReflectionFunction('test');
                      8: 
                      9: foreach ($r->getParameters() as $p) {
                     10:     var_dump($p->isDefaultValueAvailable());
                     11: }
                     12: 
                     13: foreach ($r->getParameters() as $p) {
                     14:     if ($p->isDefaultValueAvailable()) {
                     15:         var_dump($p->getDefaultValue());
                     16:     }
                     17: }
                     18: ?>
                     19: --EXPECT--
                     20: bool(true)
                     21: bool(true)
                     22: bool(false)
                     23: NULL
                     24: int(0)

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