ID: 36635 Updated by: [EMAIL PROTECTED] Reported By: slafontaine at avance dot info -Status: Open +Status: Bogus Bug Type: Class/Object related -Operating System: Windows XP +Operating System: * PHP Version: 5.1.2 -Assigned To: +Assigned To: helly New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The method is indeed callable - if you had an object. And that's the whole issue, try it with abstract methods in abstract classes, that's the same. And that's just because is_callable doesn't verify the scope. Perhaps we should verify that you actually have an object specified if that is necessary. But that would be a bigger BC break i guess. Previous Comments: ------------------------------------------------------------------------ [2006-03-06 20:15:14] slafontaine at avance dot info Description: ------------ When you use is_callable to check if a method is callable on an interface, it returns true which might be because Classes and Interfaces share the same namespace. Reproduce code: --------------- interface MyInterface { function callableFunc(); } if (is_callable(array("MyInterface", "callableFunc"))) { print("Is callable!"); call_user_func(array("MyInterface", "callableFunc")); } else { print("Is NOT callable!"); } Expected result: ---------------- Is NOT callable! Actual result: -------------- Is callable! Fatal error: Cannot call abstract method MyInterface::callableFunc() in path/to/file on line ### ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36635&edit=1
