From: [EMAIL PROTECTED]
Operating system:
PHP version: 5.3CVS-2008-06-04 (CVS)
PHP Bug Type: Scripting Engine problem
Bug description: 'class::method' works differently than array('class',
'method')
Description:
------------
See the code below.
Reproduce code:
---------------
<?php
class foo {
public function test() {
call_user_func(array('FOO', 'ABC'));
call_user_func(array($this, 'ABC'));
call_user_func('FOO::ABC');
}
function __call($a, $b) {
print "__call:\n";
var_dump($a);
}
static public function __callStatic($a, $b) {
print "__callstatic:\n";
var_dump($a);
}
}
$x = new foo;
$x->test();
Expected result:
----------------
__call:
string(3) "ABC"
__call:
string(3) "ABC"
__call:
string(3) "ABC"
Actual result:
--------------
__call:
string(3) "ABC"
__call:
string(3) "ABC"
Fatal error: Non-static method foo::ABC() cannot be called statically in
...
--
Edit bug report at http://bugs.php.net/?id=45180&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=45180&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=45180&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=45180&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45180&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=45180&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45180&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45180&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45180&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45180&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45180&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=45180&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=45180&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45180&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45180&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45180&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45180&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45180&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45180&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45180&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45180&r=mysqlcfg