language/references.xml
6d29533483657c036e49edb5ea88c7103d126681
...
...
@@ -74,7 +74,7 @@ $b = array();
74
74
foo($b['b']);
75
75
var_dump(array_key_exists('b', $b)); // bool(true)
76
76

77
-
$c = new StdClass;
77
+
$c = new stdClass;
78
78
foo($c->d);
79
79
var_dump(property_exists($c, 'd')); // bool(true)
80
80
?>
...
...
@@ -95,10 +95,13 @@ $foo =& find_var($bar);
95
95
]]>
96
96
</programlisting>
97
97
</informalexample>
98
-
<link linkend="language.oop5.basic.new">new</link>
99
-
returns a reference automatically, thus it is syntactically invalid.
100
-
For more information, see <link linkend="language.oop5.references">Objects
101
-
and references</link>.)
98
+
</para>
99
+
<para>
100
+
Using the same syntax with a function that does <emphasis>not</emphasis>
101
+
return by reference will give an error, as will using it with the result
102
+
of the <link linkend="language.oop5.basic.new">new</link> operator.
103
+
Although objects are passed around as pointers, these are not the same as references,
104
+
as explained under <link linkend="language.oop5.references">Objects and references</link>.
102
105
</para>
103
106
<warning>
104
107
<para>
...
...
@@ -529,14 +532,6 @@ $var =& $GLOBALS["var"];
529
532
won't unset the global variable.
530
533
</simpara>
531
534
</sect2>
532
-

533
-
<sect2 xml:id="references.this">
534
-
<title><literal>$this</literal></title>
535
-
<simpara>
536
-
In an object method, <varname>$this</varname> is always a reference
537
-
to the called object.
538
-
</simpara>
539
-
</sect2>
540
535
</sect1>
541
536

542
537
</chapter>
543
538