|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-02-14 14:52 UTC] arjen at react dot nl
[2011-02-14 15:52 UTC] cataphract@php.net
-Package: Reflection related
+Package: Scripting Engine problem
[2011-02-14 15:52 UTC] cataphract@php.net
[2011-02-18 00:25 UTC] felipe@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: felipe
[2011-02-18 00:25 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 02:00:01 2025 UTC |
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)