things i'd like to add:
4. abstract classes can be defined static also
<?php abstract static class foo { abstract public static function bar(); }
this means that all subclasses of foo must also be static and can only contain static methods and attributes
5. abstract classes can't be defined final
Regards, Michael
Michael Virnstein wrote:
Hi Devs,
what would probably be a nice addition:
1. static classes: static classes can only contain static methods and attributes
<?php static class foo { public static function bar() {} } ?>
2. final classes: final classes can't be extended
final class foo { public function bar() {} }
3. final static classes
final static classes can only contain static methods and attributes and can't be extended.
final static class foo { public static function bar() {} }
What do you think about it?
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php