php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #51381 Clarify class definition order importance for multiple levels of inheritance
Submitted: 2010-03-24 16:05 UTC Modified: 2010-10-20 12:25 UTC
From: dhthwy at gmail dot com Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.2.13 OS:
Private report: No CVE-ID: None
 [2010-03-24 16:05 UTC] 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.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-25 06:46 UTC] dhthwy at gmail dot com
-Type: Feature/Change Request +Type: Documentation Problem
 [2010-03-25 06:46 UTC] dhthwy at gmail dot com
Set the wrong bug type.
 [2010-10-20 12:25 UTC] 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-10-20 12:25 UTC] kalle@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: kalle
 [2010-10-20 12:25 UTC] kalle@php.net
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.


 [2020-02-07 06:09 UTC] phpdocbot@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=962b413925ddc925e480839f0185bc067ec98437
Log: Fixed bug #51381 (Clarify class definition order importance for multiple levels of inheritance)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 11:01:30 2024 UTC