1--TEST-- 2Bug #62715 (ReflectionParameter::isDefaultValueAvailable() wrong result) 3--FILE-- 4<?php 5 6function test(PDO $a = null, $b = 0, array $c) {} 7$r = new ReflectionFunction('test'); 8 9foreach ($r->getParameters() as $p) { 10 var_dump($p->isDefaultValueAvailable()); 11} 12 13foreach ($r->getParameters() as $p) { 14 if ($p->isDefaultValueAvailable()) { 15 var_dump($p->getDefaultValue()); 16 } 17} 18?> 19--EXPECTF-- 20Deprecated: Optional parameter $b declared before required parameter $c is implicitly treated as a required parameter in %s on line %d 21bool(false) 22bool(false) 23bool(false) 24