<?php class Foo { public function Bar($n1 = 09, $n2 = 9){ return 0; } } $r = new ReflectionObject(new Foo()); $m = $r->getMethod("Bar"); $p1 = $m->getParameters()[0]; $p2 = $m->getParameters()[1]; echo "p1=".$p1->getDefaultValue(); //not ok. expected = 9, returning 0. echo "<br>"; echo "p2=".$p2->getDefaultValue(); //ok = 9 ?>
You have javascript disabled. You will not be able to edit any code.