Edit report at http://bugs.php.net/bug.php?id=54013&edit=1
ID: 54013 Comment by: arjen at react dot nl Reported by: arjen at react dot nl Summary: ReflectionParam for duplicate parameter contains garbage Status: Open Type: Bug Package: Reflection related PHP Version: 5.3.5 Block user comment: N Private report: N New Comment: Related to http://bugs.php.net/bug.php?id=43512 Previous Comments: ------------------------------------------------------------------------ [2011-02-14 14:52:23] arjen at react dot nl Description: ------------ ReflectionParam object for 2nd parameter contains random value for name property. Test script: --------------- <?php class a { function b($a, $a) { $params = func_get_args(); var_dump($params, $a); } } $c = new a; $c->b('waa?', 'meukee!'); $reflectionClass = new ReflectionClass($c); $params = $reflectionClass->getMethod('b')->getParameters(); var_dump($params); Expected result: ---------------- array 0 => string 'waa?' (length=4) 1 => string 'meukee!' (length=7) string 'meukee!' (length=7) array 0 => & object(ReflectionParameter)[4] public 'name' => string 'a' (length=1) 1 => & object(ReflectionParameter)[5] public 'name' => string 'a' (length=1) or exception/error.. Actual result: -------------- array 0 => string 'waa?' (length=4) 1 => string 'meukee!' (length=7) string 'meukee!' (length=7) array 0 => & object(ReflectionParameter)[4] public 'name' => string 'a' (length=1) 1 => & object(ReflectionParameter)[5] public 'name' => string '<<insert random byte here>>' (length=1) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54013&edit=1