mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
=& 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:
parent
e438f7b8da
commit
775387ca25
1 changed files with 6 additions and 3 deletions
|
@ -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>=&</literal> in this
|
||||
context is deprecated and produces E_STRICT level message.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Not using the <literal>&</literal> operator causes a copy of the
|
||||
|
|
Loading…
Reference in a new issue