namespace path;
interface test{
public function method();
}
class test{
}
class foo implements test{
}
When writing the above code a fatal error is returned:
Cannot declare class path\test, because the name is already in use in ... on line 7
Why can not I define an interface with the same name as a class?
Is this a bug or is an interface defined as a class?
I use PHP 7.0.1
I found this link which may be a bug, but I have not yet figured it out:
Bug # 51225 can not define the class with the same name as an interface