mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
fixed bug #48138
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@279922 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
884294b494
commit
911aec1fa7
1 changed files with 7 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue