From: bmansion at mamasam dot com Operating system: macosx PHP version: 5.1.0RC1 PHP Bug Type: Class/Object related Bug description: __call(), is_callable() and static methods
Description: ------------ I think is_callable() should check for existing methods instead of returning true all the time when the class uses overloading. Otherwise it becomes useless. This is IMO particularly true for static methods checks, since __call is defined as non-static. Reproduce code: --------------- class A { public function __call($m, $a) { } } class B extends A { public static function foo() { echo 'foo'; } } if (is_callable(array('A', 'foo'))) { call_user_func(array('A', 'foo')); } Expected result: ---------------- Outputs nothing. Actual result: -------------- Fatal error: Call to undefined method A::foo() -- Edit bug report at http://bugs.php.net/?id=34678&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34678&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34678&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34678&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34678&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34678&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34678&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34678&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34678&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34678&r=support Expected behavior: http://bugs.php.net/fix.php?id=34678&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34678&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34678&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34678&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34678&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34678&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34678&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34678&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34678&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34678&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34678&r=mysqlcfg