svn: /phpdoc/en/trunk/language/oop5/ changelog.xml decon.xml
| From: | Daniel Egeberg | Date: | Thu, 22 Jul 2010 17:47:40 +0000 |
| Subject: | svn: /phpdoc/en/trunk/language/oop5/ changelog.xml decon.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-6910@lists.php.net to get a copy of this message | ||
degeberg Thu, 22 Jul 2010 17:47:40 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=301474
Log:
Documented constructor changes in PHP 5.3.3.
Changed paths:
U phpdoc/en/trunk/language/oop5/changelog.xml
U phpdoc/en/trunk/language/oop5/decon.xml
Modified: phpdoc/en/trunk/language/oop5/changelog.xml
===================================================================
--- phpdoc/en/trunk/language/oop5/changelog.xml 2010-07-22 17:07:49 UTC (rev 301473)
+++ phpdoc/en/trunk/language/oop5/changelog.xml 2010-07-22 17:47:40 UTC (rev 301474)
@@ -17,6 +17,16 @@
</thead>
<tbody>
<row>
+ <entry>5.3.3</entry>
+ <entry>
+ Changed: Methods with the same name as the last element of
+ a <link linkend="language.namespaces">namespaced</link>
+ class name will no longer be treated as <link
+ linkend="language.oop5.decon">constructor</link>. This change
doesn't
+ affect non-namespaced classes.
+ </entry>
+ </row>
+ <row>
<entry>5.3.0</entry>
<entry>
Changed: It's now possible to reference the class using a variable (e.g.,
Modified: phpdoc/en/trunk/language/oop5/decon.xml
===================================================================
--- phpdoc/en/trunk/language/oop5/decon.xml 2010-07-22 17:07:49 UTC (rev 301473)
+++ phpdoc/en/trunk/language/oop5/decon.xml 2010-07-22 17:47:40 UTC (rev 301474)
@@ -62,6 +62,27 @@
<function>__construct</function> is overridden with different parameters
than the parent <function>__construct</function> method has.
</para>
+ <para>
+ As of PHP 5.3.3, methods with the same name as the last element of a
+ namespaced class name will no longer be treated as constructor. This
+ change doesn't affect non-namespaced classes.
+ </para>
+ <example>
+ <title>Constructors in namespaced classes</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+namespace Foo;
+class Bar {
+ public function Bar() {
+ // treated as constructor in PHP 5.3.0-5.3.2
+ // treated as regular method as of PHP 5.3.3
+ }
+}
+?>
+]]>
+ </programlisting>
+ </example>
</sect2>
<sect2 xml:id="language.oop5.decon.destructor">