- Document that we have @new but not @&new or &@new, closes #14094.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@85252 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Markus Fischer 2002-06-10 10:51:58 +00:00
parent 872e9bc010
commit 1cb3dbe288
2 changed files with 15 additions and 2 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.35 $ -->
<!-- $Revision: 1.36 $ -->
<chapter id="language.oop">
<title>Classes and Objects</title>
@ -344,6 +344,12 @@ $different_cart = new Constructor_Cart("20", 17);
</programlisting>
</informalexample>
<para>
You also can use the <literal>@</literal> operator to
<emphasis>mute</emphasis> errors occuring in the constructor, e.g.
<literal>@new</literal>.
</para>
<caution>
<simpara>
In PHP 3, derived classes and constructors have a number of

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.22 $ -->
<!-- $Revision: 1.23 $ -->
<chapter id="language.references">
<title>References Explained</title>
@ -63,6 +63,13 @@ $foo =& find_var ($bar);
what is desired. Usually you want to have a single instance to work with,
due to performance and memory consumption issues.
</para>
<para>
While you can use the <literal>@</literal> operator to
<emphasis>mute</emphasis> any errors in the constructor when using it as
<literal>@new</literal>, this does not work when using the
<literal>&amp;new</literal> statement. This is a limitation of the Zend
Engine and will therefore result in a parser error.
</para>
</note>
<para>
The second thing references do is to pass variables