mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Fixed a typo.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@30428 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
b3c481736c
commit
913bcd2e0e
1 changed files with 28 additions and 28 deletions
|
@ -258,7 +258,7 @@ list ($zero, $one, $two) = small_numbers();
|
|||
<para>
|
||||
To return a reference from a function, you have to use
|
||||
the reference operator & in both the function declaration and
|
||||
when asigning the return value to a variable:
|
||||
when assigning the return value to a variable:
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
function &returns_reference() {
|
||||
|
@ -272,34 +272,8 @@ $newref = &returns_reference();
|
|||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="functions.old-syntax">
|
||||
<title><literal>old_function</literal></title>
|
||||
|
||||
<simpara>
|
||||
The <literal>old_function</literal> statement allows you to
|
||||
declare a function using a syntax identical to PHP/FI2 (except you
|
||||
must replace 'function' with 'old_function'.
|
||||
</simpara>
|
||||
<simpara>
|
||||
This is a deprecated feature, and should only be used by the
|
||||
PHP/FI2->PHP3 convertor.
|
||||
</simpara>
|
||||
<warning>
|
||||
<para>
|
||||
Functions declared as <literal>old_function</literal> cannot be
|
||||
called from PHP's internal code. Among other things, this means
|
||||
you can't use them in functions such as
|
||||
<function>usort</function>, <function>array_walk</function>, and
|
||||
<function>register_shutdown_function</function>. You can get
|
||||
around this limitation by writing a wrapper function (in normal
|
||||
PHP3 form) to call the <literal>old_function</literal>.
|
||||
</para>
|
||||
</warning>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="functions.variable-functions">
|
||||
<title>Variable functions</title>
|
||||
<title>Function variables</title>
|
||||
|
||||
<para>
|
||||
PHP supports the concept of variable functions. This means that if
|
||||
|
@ -333,6 +307,32 @@ $func( 'test' );
|
|||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="functions.old-syntax">
|
||||
<title><literal>old_function</literal></title>
|
||||
|
||||
<simpara>
|
||||
The <literal>old_function</literal> statement allows you to
|
||||
declare a function using a syntax identical to PHP/FI2 (except you
|
||||
must replace 'function' with 'old_function'.
|
||||
</simpara>
|
||||
<simpara>
|
||||
This is a deprecated feature, and should only be used by the
|
||||
PHP/FI2->PHP3 convertor.
|
||||
</simpara>
|
||||
<warning>
|
||||
<para>
|
||||
Functions declared as <literal>old_function</literal> cannot be
|
||||
called from PHP's internal code. Among other things, this means
|
||||
you can't use them in functions such as
|
||||
<function>usort</function>, <function>array_walk</function>, and
|
||||
<function>register_shutdown_function</function>. You can get
|
||||
around this limitation by writing a wrapper function (in normal
|
||||
PHP3 form) to call the <literal>old_function</literal>.
|
||||
</para>
|
||||
</warning>
|
||||
|
||||
</sect1>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
Loading…
Reference in a new issue