ID:               43405
 Updated by:       [EMAIL PROTECTED]
 Reported By:      m at digitalsandwich dot com
 Status:           Open
-Bug Type:         Unknown/Other Function
+Bug Type:         Scripting Engine problem
 Operating System: linux 2.6.22-gentoo-r8
 PHP Version:      5.3CVS-2007-11-26 (CVS)
 New Comment:

It's caused by the parameter parsing API. Perhaps that needs some
fixing..


Previous Comments:
------------------------------------------------------------------------

[2007-11-26 03:59:28] m at digitalsandwich dot com

Description:
------------
In PHP 5.2 it was possible to use call_user_func*() to call a
non-static method statically. In the latest cvs code for PHP 5.3 this
will now produce a warning and does not appear to call the function.

This looks like a regression of http://bugs.php.net/bug.php?id=26543

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

class A
{
        public function test()
        {
                echo get_class($this);
        }
}

class B extends A
{
        public function test()
        {
                call_user_func(array('parent', 'test'));
        }
}

$b = new B;
$b->test();

?>


Expected result:
----------------
B

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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43405&edit=1

Reply via email to