ID: 48019 Comment by: pulni4kiya at abv dot bg Reported By: pulni4kiya at abv dot bg Status: Open Bug Type: Feature/Change Request Operating System: * PHP Version: 5.2.9 New Comment:
Sorry for writing again but it would have been good if you said anything about this bug. And yes I still think it's a bug, not a 'feature/change request'. Previous Comments: ------------------------------------------------------------------------ [2009-04-19 22:50:10] pulni4kiya at abv dot bg Description: ------------ The problem is that ReflectionMethod's invoke() method does not return reference (when it should)! Neither does call_user_func() for that matter. Reproduce code: --------------- class A { public static $c = 100; public static function &D() { return self::$c; } } echo A::$c; //prints 100 $cRef1 =& A::D(); $cRef1 = 200; echo A::$c; //prints 200 $a = new ReflectionClass('A'); $d = $a->getMethod('D'); $cRef2 =& $d->invoke(null); //DOES NOT RETURN REFERENCE!!! $cRef2 = 300; echo A::$c; //prints 200 Expected result: ---------------- 100200300 Actual result: -------------- 100200200 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48019&edit=1