DEV Community

Discussion on: PHP... yay or nay?

Collapse
 
samuraiseoul profile image
Sophie The Lionhart

OOP in PHP is not perfect. For instance, an interface can define the constructor's signature.

interface Foo {
    public function __construct(SomeDependency $someDependency);
}

This isn't allowed in most languages(maybe any others) and is pretty against SOLID principles.

Collapse
 
vlasales profile image
Vlastimil Pospichal • Edited

This is not against SOLID principles. Simply I don't use it.