From:             chuck at horde dot org
Operating system: MacOS 10.4
PHP version:      5.3CVS-2007-11-10 (CVS)
PHP Bug Type:     Scripting Engine problem
Bug description:  array-based callback syntax is overly E_STRICT

Description:
------------
The callback syntax of array('classname', 'methodname') for making static
method calls is now enforcing E_STRICT even if E_STRICT is not on. So
methods that are not explicitly declared static can't be used this way even
with E_STRICT off. Putting static in front of the function makes it work,
but of course results in a parse error when the code is run under PHP 4.

Reproduce code:
---------------
<?php

class Test {
    function hello() {
        echo "hello\n";
    }
}

call_user_func(array('Test', 'hello'));

Expected result:
----------------
hello

Actual result:
--------------
Warning: call_user_func() expects parameter 1 to be valid callback, array
given in /Users/chuck/callback.php on line 11

-- 
Edit bug report at http://bugs.php.net/?id=43231&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43231&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43231&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43231&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43231&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=43231&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=43231&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=43231&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=43231&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=43231&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=43231&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=43231&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=43231&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=43231&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=43231&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43231&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=43231&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=43231&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=43231&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=43231&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=43231&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=43231&r=mysqlcfg

Reply via email to