mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
& -> &, 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:
parent
03dfca077e
commit
19c18524d3
1 changed files with 8 additions and 9 deletions
|
@ -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>&</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>&</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>
|
||||
|
|
Loading…
Reference in a new issue