Doc #51381 [Opn->Csd]: Clarify class definition order importance for multiple levels of inheritance

From: Date: Wed, 20 Oct 2010 10:25:39 +0000
Subject: Doc #51381 [Opn->Csd]: Clarify class definition order importance for multiple levels of inheritance
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5289@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51381&edit=1 ID: 51381 Updated by: kalle@php.net Reported by: dhthwy at gmail dot com Summary: Clarify class definition order importance for multiple levels of inheritance -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: 5.2.13 -Assigned To: +Assigned To: kalle Block user comment: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2010-10-20 12:25:29] kalle@php.net Automatic comment from SVN on behalf of kalle Revision: http://svn.php.net/viewvc/?view=revision&revision=304561 Log: Fixed bug #51381 (Clarify class definition order importance for multiple levels of inheritance) ------------------------------------------------------------------------ [2010-03-25 06:46:27] dhthwy at gmail dot com Set the wrong bug type. ------------------------------------------------------------------------ [2010-03-24 16:05:50] dhthwy at gmail dot com Description: ------------ It is not clear from the PHP5 class documentation how important the order of class definition is in the the context of multiple levels of inheritance. According to the PHP4 doc on extends @ http://php.net/manual/en/keyword.extends.php the following code is incorrect due to the order in which the classes are defined: class one extends two {} class two extends three {} class three {} However PHP5's docs make no mention if the order of definition is still significant. OR if its only significant when there are multiple levels of inheritance. The preceding code throws a fatal error 'class not found' for the class two. The following code however does work: class one extends two {} class two {} Request clarification please. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51381&edit=1

« previous php.doc.bugs (#5289) next »