svn: /phpdoc/en/trunk/language/oop5/ basic.xml decon.xml

From: Date: Wed, 24 Feb 2010 12:44:37 +0000
Subject: svn: /phpdoc/en/trunk/language/oop5/ basic.xml decon.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-6129@lists.php.net to get a copy of this message
degeberg Wed, 24 Feb 2010 12:44:37 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=295468 Log: Fixed PHP bug #50870 (Constructor parameters do not have to match those of superclass constructor) Bug: http://bugs.php.net/50870 (Open) Constructor parameters do not have to match those of superclass constructor Changed paths: U phpdoc/en/trunk/language/oop5/basic.xml U phpdoc/en/trunk/language/oop5/decon.xml Modified: phpdoc/en/trunk/language/oop5/basic.xml =================================================================== --- phpdoc/en/trunk/language/oop5/basic.xml 2010-02-24 12:34:43 UTC (rev 295467) +++ phpdoc/en/trunk/language/oop5/basic.xml 2010-02-24 12:44:37 UTC (rev 295468) @@ -196,6 +196,12 @@ methods or static properties by referencing them with <link linkend="language.oop5.paamayim-nekudotayim">parent::</link>. </para> + <para> + When overriding methods, the parameter signature should remain the same or + PHP will generate an <constant>E_STRICT</constant> level error. This does + not apply to the constructor, which allows overriding with different + parameters. + </para> <example> <title>Simple Class Inheritance</title> <programlisting role="php"> Modified: phpdoc/en/trunk/language/oop5/decon.xml =================================================================== --- phpdoc/en/trunk/language/oop5/decon.xml 2010-02-24 12:34:43 UTC (rev 295467) +++ phpdoc/en/trunk/language/oop5/decon.xml 2010-02-24 12:44:37 UTC (rev 295468) @@ -56,6 +56,12 @@ issues is if the class had a method named <function>__construct</function> which was used for different semantics. </para> + <para> + Unlike with other metods, PHP will not generate an + <constant>E_STRICT</constant> level error message when + <function>__construct</function> is overridden with different parameters + than the parent <function>__construct</function> method has. + </para> </sect2> <sect2 xml:id="language.oop5.decon.destructor">

« previous php.doc.cvs (#6129) next »