Re: svn: /phpdoc/en/trunk/language/oop5/ basic.xml
| From: | Peter Cowburn | Date: | Mon, 16 Aug 2010 08:23:53 +0000 |
| Subject: | Re: svn: /phpdoc/en/trunk/language/oop5/ basic.xml | ||
| References: | 1 | Groups: | php.doc.cvs |
| Request: | Send a blank email to doc-cvs+get-6997@lists.php.net to get a copy of this message | ||
On 15 August 2010 08:39, Daniel Egeberg <degeberg@php.net> wrote:
> degeberg Sun, 15 Aug 2010 07:39:53 +0000
>
> Revision:
> http://svn.php.net/viewvc?view=revision&revision=302259
>
> Log:
> Fixed PHP bug #52494 (description of keyword "new")
>
> Bug: http://bugs.php.net/52494 (Open) description of keyword
> "new"
>
> Changed paths:
> U phpdoc/en/trunk/language/oop5/basic.xml
>
> Modified: phpdoc/en/trunk/language/oop5/basic.xml
> ===================================================================
> --- phpdoc/en/trunk/language/oop5/basic.xml 2010-08-15 07:35:45 UTC (rev 302258)
> +++ phpdoc/en/trunk/language/oop5/basic.xml 2010-08-15 07:39:53 UTC (rev 302259)
> @@ -111,14 +111,19 @@
> <sect2 xml:id="language.oop5.basic.new">
> <title>new</title>
> <para>
> - To create an instance of a class, a new object must be created and
> - assigned to a variable. An object will always be assigned when
> - creating a new object unless the object has a
> + To create an instance of a class, the <literal>new</literal> keyword must
> + be used. An object will always be created when unless the object has a
Hmm, "An object will always be created when unless the object".
Something's not quote right there.
> <link linkend="language.oop5.decon">constructor</link> defined that
> throws an
> <link linkend="language.exceptions">exception</link> on error.
> Classes
> should be defined before instantiation (and in some cases this is a
> requirement).
> </para>
> + <para>
> + If a <type>string</type> containing the name of a class is used with
> + <literal>new</literal>, a new instance of that class will be created. If
> + the class is in a namespace, its fully qualified name must be used when
> + doing this.
> + </para>
> <example>
> <title>Creating an instance</title>
> <programlisting role="php">
>
>
> --
> PHP Documentation Commits Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>