Interfaces and access types

php.internals

Cristiano Duarte

21 years ago
Hi all, Today I checked out the latest PHP-CVS and there is something I am really missing. This code: <?php interface MyInterface { static function myStaticMethodDeclarationUsedToWorkNowDont(); } class MyClass implements MyInterface { public static function myStaticMethodDeclarationUsedToWorkNowDont() { } } ?> Now gives me this error: PHP Fatal error: Access type for interface method MyInterface::myStaticMethodDeclarationUsedToWorkNowDont() must be omitted in - on line 4 And if I do: interface MyInterface { function myStaticMethodDeclarationUsedToWorkNowDont(); } class MyClass implements MyInterface { public static function myStaticMethodDeclarationUsedToWorkNowDont() { } } ?> I get: PHP Fatal error: Cannot make non static method MyInterface::myStaticMethodDeclarationUsedToWorkNowDont() static in class MyClass in /webpages/sistemas2/RadFrame-lib/classes/radframe/x.php on line 6 I need a way to force a class to have a static method using interfaces. Now I can't do it anymore. Is it possible to put this feature back on CVS again ? Best Regards, Cristiano Duarte