Mostafa Talebi
Mostafa Talebi

Reputation: 9183

Interfaces and namespaces in PHP

I have started to use interfaces. They are just handy. But I'm thinking of employing my namespaces beside them. I need to have a certain namespace scheme. Shall the interface be defined in the same namespace that the class is going to implement?

Upvotes: 0

Views: 53

Answers (1)

Fabien Papet
Fabien Papet

Reputation: 2319

No you can define an interface in a namespace and a class in another

Upvotes: 1

Related Questions