DEV Community

loading...

Discussion on: Make sense of PHP interfaces

Collapse
taufik_nurrohman profile image
Taufik Nurrohman

You could also use traits.

Collapse
vlasales profile image
Vlastimil Pospichal

Traits are a highway to hell.

Collapse
jmau111 profile image
Julien Maury Author

Hi, I agree you can indeed combine the use of traits with interfaces but you cannot use traits instead of interfaces. It depends on what you want to achieve.