From: ladoo at gmx dot at Operating system: Linux (x86) PHP version: 5.0.3 PHP Bug Type: Zend Engine 2 problem Bug description: calling call_user_func_array() ends in infinite loop within child class
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 bug report at http://bugs.php.net/?id=32290&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32290&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32290&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32290&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32290&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32290&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32290&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32290&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32290&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32290&r=support Expected behavior: http://bugs.php.net/fix.php?id=32290&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32290&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32290&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32290&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32290&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32290&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32290&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32290&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32290&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32290&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32290&r=mysqlcfg