mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
reference only required in PHP4, add an alternative as an example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@247766 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
868fd0c40b
commit
3a33e2cfc1
2 changed files with 37 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<refentry xml:id="function.call-user-method-array" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>call_user_method_array</refname>
|
||||
|
@ -11,16 +11,31 @@
|
|||
<type>mixed</type><methodname>call_user_method_array</methodname>
|
||||
<methodparam><type>string</type><parameter>method_name</parameter></methodparam>
|
||||
<methodparam><type>object</type><parameter role="reference">obj</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>paramarr</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>params</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<warning>
|
||||
<para>
|
||||
The <function>call_user_method_array</function> function is deprecated
|
||||
as of PHP 4.1.0, use the <function>call_user_func_array</function> variety
|
||||
with the <literal>array(&$obj, "method_name")</literal> syntax instead.
|
||||
as of PHP 4.1.0.
|
||||
</para>
|
||||
</warning>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>call_user_method_array</function> alternative</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
call_user_func_array(array($obj, $method_name), $params);
|
||||
call_user_func_array(array(&$obj, $method_name), $params); // PHP 4
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<!-- $Revision: 1.14 $ -->
|
||||
<refentry xml:id="function.call-user-method" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>call_user_method</refname>
|
||||
|
@ -17,11 +17,26 @@
|
|||
<warning>
|
||||
<para>
|
||||
The <function>call_user_method</function> function is deprecated
|
||||
as of PHP 4.1.0, use the <function>call_user_func</function> variety
|
||||
with the <literal>array(&$obj, "method_name")</literal> syntax instead.
|
||||
as of PHP 4.1.0.
|
||||
</para>
|
||||
</warning>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>call_user_method</function> alternative</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
call_user_func(array($obj, $method_name), $parameter /* , ... */);
|
||||
call_user_func(array(&$obj, $method_name), $parameter /* , ... */); // PHP 4
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue