Re: declaring classes as static or final

From: Date: Tue, 28 Sep 2004 13:44:48 +0000
Subject: Re: declaring classes as static or final
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-13050@lists.php.net to get a copy of this message
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?


« previous php.internals (#13050) next »