Eugene Owak
Eugene Owak

Jun 8, 2021

·
1 min read

A class cannot both extend another class (inheritance) as well as implement an interface. If you want to extend shared behavior to implement some of the functionality defined on an interface…

OOP: Composition & Inheritance in PHP
21
1

Adrienne Domingus

This is possible in PHP, a class can extend and implement any number of interfaces at the same time. There is actually a [question on stack-overflow](https://stackoverflow.com/q/652157/7607526) about it.

--

--

More from Eugene Owak

Software Engineer

AboutHelpTermsPrivacy


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Get unlimited access
Eugene Owak

Eugene Owak

Software Engineer

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech