Interfaces and access types

From: Date: Fri, 14 Jan 2005 13:10:37 +0000
Subject: Interfaces and access types
Groups: php.internals 
Request: Send a blank email to internals+get-14394@lists.php.net to get a copy of this message
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

« previous php.internals (#14394) next »