mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 08:28:54 +00:00
Fix half-deleted sentence about "new" and reference assignment (#520)
This had a stray ")", and was left with a misleading half-sentence about "new" returning a reference, which it doesn't.
This commit is contained in:
parent
e6be4fb01d
commit
fe18943c11
1 changed files with 7 additions and 4 deletions
|
@ -95,10 +95,13 @@ $foo =& find_var($bar);
|
|||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
<link linkend="language.oop5.basic.new">new</link>
|
||||
returns a reference automatically, thus it is syntactically invalid.
|
||||
For more information, see <link linkend="language.oop5.references">Objects
|
||||
and references</link>.)
|
||||
</para>
|
||||
<para>
|
||||
Using the same syntax with a function that does <emphasis>not</emphasis>
|
||||
return by reference will give an error, as will using it with the result
|
||||
of the <link linkend="language.oop5.basic.new">new</link> operator.
|
||||
Although objects are passed around as pointers, these are not the same as references,
|
||||
as explained under <link linkend="language.oop5.references">Objects and references</link>.
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue