short description of functions returning references (see bug id#5813)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@30353 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hartmut Holzgraefe 2000-08-16 09:08:39 +00:00
parent 47b92dda52
commit 4106cf4503

View file

@ -255,6 +255,20 @@ list ($zero, $one, $two) = small_numbers();
</programlisting>
</informalexample>
</para>
<para>
To return a reference from a function, you have to use
the reference operator &amp; in both the function declaration and
when asigning the return value to a variable:
<informalexample>
<programlisting role="php">
function &amp;returns_reference() {
return &amp;$someref;
}
$newref = &amp;returns_reference();
</programlisting>
</informalexample>
</para>
</sect1>