jan Wed Dec 12 16:15:37 2001 EDT
Modified files:
/phpdoc/en/language references.xml
Log:
"fix" for #11719. clearifyed references and copies on objects.
Index: phpdoc/en/language/references.xml
diff -u phpdoc/en/language/references.xml:1.20 phpdoc/en/language/references.xml:1.21
--- phpdoc/en/language/references.xml:1.20 Wed Dec 12 15:47:39 2001
+++ phpdoc/en/language/references.xml Wed Dec 12 16:15:37 2001
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.20 $ -->
+<!-- $Revision: 1.21 $ -->
<chapter id="language.references">
<title>References Explained</title>
@@ -55,12 +55,14 @@
</para>
<note>
<para>
- Unless you use the syntax above, the result of
- <literal>$bar = new fooclass()</literal> will not be the same
- variable as <literal>$this</literal> in the constructor, meaning
- that if you have used reference to <literal>$this</literal> in
- the constructor, you should use reference assignment, or you get
- two different objects.
+ 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.
</para>
</note>
<para>