# Interfaces and access types

- Thread: https://externals.io/message/14394
- Original archive: https://news-web.php.net/php.internals/14394
- Started by Cristiano Duarte on 2005-01-14T13:10:37+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #14394 — Cristiano Duarte — 2005-01-14T13:10:37+00:00

URL: https://externals.io/message/14394#14394

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
