Edit report at https://bugs.php.net/bug.php?id=63578&edit=1
ID: 63578 Updated by: larue...@php.net Reported by: pierre at pcservice dot co dot za Summary: is_callable returns false with __call -Status: Open +Status: Not a bug Type: Bug Package: *General Issues Operating System: mac & linux PHP Version: Irrelevant -Assigned To: +Assigned To: dmitry Block user comment: N Private report: N 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 Class Foo { public function __call($method, $args) {} } Foo::bar(); //result in Fatal error: Call to undefined method Foo::bar() Previous Comments: ------------------------------------------------------------------------ [2012-11-22 06:31:25] pierre at pcservice dot co dot za Description: ------------ When you have a class that have a __call magic method, when calling is_callable with an array and the first argument a string, it returns false. Test script: --------------- Class Foo { public function __call($method, $args) {} } var_dump(is_callable(array('Foo', 'bar'))); var_dump(is_callable(array(new Foo, 'bar'))); Expected result: ---------------- true true Actual result: -------------- false true ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63578&edit=1