& -> &, tighten the wording a bit

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@64872 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
jim winstead 2001-12-12 21:29:56 +00:00
parent 03dfca077e
commit 19c18524d3

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.21 $ -->
<!-- $Revision: 1.22 $ -->
<chapter id="language.references">
<title>References Explained</title>
@ -55,14 +55,13 @@ $foo =& find_var ($bar);
</para>
<note>
<para>
Not using the <literal>&</literal> operator causes a copy of
the object. If you use <literal>$this</literal> in the class
it will operate on the current instance of the class. The
assignment without <literal>& </literal>will copy the instance
(i.e. the object) and <literal>$this</literal> will operate on
the copy, which is not always favoured. Mostly you want to have
a single instance to work with, due to performace and memory
consumption issues.
Not using the <literal>&amp;</literal> operator causes a copy of the
object to be made. If you use <literal>$this</literal> in the class it
will operate on the current instance of the class. The assignment without
<literal>&amp;</literal> will copy the instance (i.e. the object) and
<literal>$this</literal> will operate on the copy, which is not always
what is desired. Usually you want to have a single instance to work with,
due to performance and memory consumption issues.
</para>
</note>
<para>