|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-05-22 14:30 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 13:00:01 2025 UTC |
I don't know if this is in the right spot, but there seemed to be no other way to send in requests, so here goes: ----------------------------------------------- I noticed it's not possible to do multiple inheritance other than doing the following: class c extends b { } class b extends a { } class a { } This is a bit too limiting for my taste, as you can only really inherit from 1 non-user-defined class, which is the top one. The rest, you'll have to create yourself. This can be quite annoying, especially when you have various other classes which you have no write-access to to modify so they extend another class. What i'd like to do is: class a extends b extends c { } This would enable the programmer to inherit as many classes as he/she wants, and not be fooling around with millions of subclasses, which in turn require other subclasses, making for some very long (and weird) spaghetti-like-programming.. Also, what could be ideal, is variable (multiple) class inheritance: class a extends $b extends $c { } where $b and $c are variables defined at run-time. This would make (for example) the creation of database-wrappers and various other types of interfaces a LOT easier, though it'll probably be a pain to implement into PHP, even if it's at all possible.......:(