ID:               18016
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
-Bug Type:         Scripting Engine problem
+Bug Type:         Documentation problem
 Operating System: all
 PHP Version:      4.2.1
 New Comment:

The syntax for calling static class methods is

  array('classname', 'methodname');

Reclassiyfing as documentation problem.


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

[2002-06-27 08:08:05] [EMAIL PROTECTED]

<?

class test
{
        function staticFunction($a)
        {
                echo "\ntest::staticFunction($a)";
        }
}

echo "\nTest page\n";

echo 'function_exists=['.function_exists("test::staticFunction").']';

test::staticFunction(999);

call_user_func_array("test::staticFunction",array(999));

?>

Result:

Test page
function_exists=[]
test::staticFunction(999)
Warning: call_user_func_array() expects first argument,
'test::staticFunction',
to be a valid callback in bug.php on line 17

Must be:

Test page
function_exists=[TRUE]
test::staticFunction(999)
test::staticFunction(999)


(Please, don't write me stupid comments about method_exists()! Just
read one more time function name.)


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


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


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to