ID: 32290 User updated by: ladoo at gmx dot at -Summary: calling call_user_func_array() ends in infinite loop within child class Reported By: ladoo at gmx dot at Status: Open Bug Type: Zend Engine 2 problem Operating System: Linux (x86) PHP Version: 5.0.3 New Comment:
more accurate title Previous Comments: ------------------------------------------------------------------------ [2005-03-13 13:04:59] ladoo at gmx dot at Description: ------------ I have a class A and a class B which extends A. Both have a equally named method. When I try to call A::method with call_user_func_array it calls B::method instead. Reproduce code: --------------- class A { public function doSomething($i) { return --$i; } } class B extends A { public function doSomething($i) { $i++; if ($i >= 100) return 100; return call_user_func_array(array("A","doSomething"), array($i)); } } $x = new B(); echo $x->doSomething(1); Expected result: ---------------- 1 Actual result: -------------- 100 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32290&edit=1