=& new produces E_STRICT since PHP 5

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@200790 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2005-11-18 16:20:48 +00:00
parent e438f7b8da
commit 775387ca25

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.45 $ -->
<!-- $Revision: 1.46 $ -->
<chapter id="language.references">
<title>References Explained</title>
@ -60,9 +60,12 @@ $bar =& new fooclass();
$foo =& find_var($bar);
?>
]]>
</programlisting>
</programlisting>
</informalexample>
</para>
Since PHP 5, <link linkend="language.oop5.basic.new">new</link> return
reference automatically so using <literal>=&amp;</literal> in this
context is deprecated and produces E_STRICT level message.
</para>
<note>
<para>
Not using the <literal>&amp;</literal> operator causes a copy of the