More OOP

From: Date: Thu, 18 Jan 2001 12:34:53 +0000
Subject: More OOP
Groups: php.dev 
Request: Send a blank email to php-dev+get-44464@lists.php.net to get a copy of this message
Hi I'm writing to the PHP Development mailing list because I have some questions and I don't know of any other place to ask. Pleaze correct me if I'm wrong, but you are the guys with the code, so you should be the people to consult. So here it goes: I think that there are to basic flaws with the PHP we have today (they are both about the OOP part of PHP): 1: If you are overriding an existing method in a class, it is then not possible to call the original method. Its a very basic thing in OOP and should be possible. This is allowed in other languages such as C++ and Java. In Java this is done by using the super var. (In java they also have the "this" var. The "super" var. is identical to "this" whereas it just calls the overridden method). 2: It would also be great if PHP supported methods with the same name but with different arguments. I'm not sure if this is possible in a language such as PHP, because that you don't have to assign a type (int, char) to a variable (like you do in Java and C/C++ and most other compiled languages). If you like me to explain my questions more in depth then just reply. /watson

« previous php.dev (#44464) next »