git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@279922 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Florian Anderiasch 2009-05-04 22:20:08 +00:00
parent 884294b494
commit 911aec1fa7

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.21 $ -->
<!-- $Revision: 1.22 $ -->
<refentry xml:id="function.call-user-func" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>call_user_func</refname>
@ -31,6 +31,8 @@
The function to be called. Class methods may also be invoked
statically using this function by passing
<literal>array($classname, $methodname)</literal> to this parameter.
Additionally class methods of an object instance may be called by passing
<literal>array($objectinstance, $methodname)</literal> to this parameter.
</para>
</listitem>
</varlistentry>
@ -137,6 +139,10 @@ $classname = "myclass";
call_user_func(array($classname, 'say_hello'));
call_user_func($classname .'::say_hello'); // As of 5.2.3
$myobject = new myclass();
call_user_func(array($myobject, 'say_hello'));
?>
]]>
</programlisting>