Extending PHP to OOP
| From: | KIM Hiongun | Date: | Tue, 21 Sep 1999 10:36:29 +0000 |
| Subject: | Extending PHP to OOP | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-11140@lists.php.net to get a copy of this message | ||
Hi PHP guys,
I compared C++/Java and PHP and then tried to find the most urgently
required features for extending PHP towards OOP. Here's my conclusion.
I judged Yes/No according to my personal experience on Java and C++.
Let us call the resultant language PHP+. (Not PHP++ why? because it's
not that much extended). I think some body may write a preprocessor
in PHP, which converts a PHP+ scripts into normal PHP scripts.
* abstract class - No
* final class - No
* nested class - No
* anonymous class - No
* private member/method - No
* protected member/method - No
* public member/method - Yes (by default)
* friend method - No
* static member/method - Yes
* synchronized method - No
* function/method overloading - Yes (distinguish according
to the number of arguments)
* operator overloading - No
* virtual(abstract) method - Yes
* delete operator - No (Use 'finalize' instead)
* class finalizer (destructor) - Yes
* class clone/serialize - Yes
* class equals - Yes
* class main - Yes
* try/throw/throws/catch/finally - No
* multiple inheritance - No
* interface - Yes (pure virtual[abstract] class)
* implements - Yes (allows work around multiple inheritance)
* package - Yes (allows large-scale development)
* import (use) package - Yes
* instanceof operator - Yes
* sizeof operator - No??
* template - No (Speed isn't that much important.)
* inline function/method - No
* native functions - No
* asm - No
* const variable - Yes
* static variable - Yes
* extern (global) variable - Yes
* volatile variable - No
* transient variable - No
* register variable - No
* auto variable - No
* structure/union - No (class suffices)
* typedef - No