Edit report at https://bugs.php.net/bug.php?id=63468&edit=1
ID: 63468 Updated by: dmi...@php.net Reported by: patrik at votocek dot cz Summary: wrong called method as callback with inheritance -Status: Assigned +Status: Closed Type: Bug Package: Scripting Engine problem Operating System: ArchLinux PHP Version: 5.4.8 Assigned To: dmitry Block user comment: N Private report: N New Comment: Automatic comment on behalf of dmi...@zend.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=396c1e990a0e513cf2e8510e9b6f82ab425c9e3a Log: Fixed bug #63468 (wrong called method as callback with inheritance) Previous Comments: ------------------------------------------------------------------------ [2012-11-08 15:05:29] larue...@php.net dmitry, do you have time to look at this patch? thanks ------------------------------------------------------------------------ [2012-11-08 15:04:47] larue...@php.net The following patch has been added/updated: Patch Name: bug63468.patch Revision: 1352387087 URL: https://bugs.php.net/patch-display.php?bug=63468&patch=bug63468.patch&revision=1352387087 ------------------------------------------------------------------------ [2012-11-08 13:18:39] patrik at votocek dot cz Description: ------------ callback call private method (in parent class) instead of public method in current class Test script: --------------- <?php class Foo { public function run() { return call_user_func(array('Bar', 'getValue')); } private static function getValue() { return 'Foo'; } } class Bar extends Foo { public static function getValue() { return 'Bar'; } } $x = new Bar; $x->run(); Expected result: ---------------- 'Bar' Actual result: -------------- 'Foo' ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63468&edit=1