php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #20000 Classes: extend from more than one parent
Submitted: 2002-10-20 09:33 UTC Modified: 2002-10-20 09:38 UTC
Votes:11
Avg. Score:4.0 ± 1.3
Reproduced:8 of 8 (100.0%)
Same Version:4 (50.0%)
Same OS:5 (62.5%)
From: novaki at dcs dot vein dot hu Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.2.3 OS: All
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: novaki at dcs dot vein dot hu
New email:
PHP Version: OS:

 

 [2002-10-20 09:33 UTC] novaki at dcs dot vein dot hu
In most of the languages child classes can inherit from more than one parent classes (C++, Java).

In PHP it is not impossible at the moment, as far as I know.
A proposed syntax would be (as in other languages):

class childClass extends parClass1, parClass2 {

}

Obviously, a number of questions may occur, for example, constructors cannot be called automatically in this case, so I suppose this is not a trivial problem.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-20 09:38 UTC] derick@php.net
Congratulations with the 20000th entry :)
Anyway, PHP has aggregation for this: http://php.net/aggregate , and this is the method we chose to implement things like 'multiple inheritence'.

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 18:01:31 2024 UTC