php Classes : Abstract class vs interface

preview_player
Показать описание
Support this channel
Thanks a lot

The purpose of both Abstract classes and interface is to abstract out details from the concrete classes. But there is a primary difference between Abstract class and interface. Abstract class can actually contain a method and body which means it takes away some of the code of the concrete class, it will be derived to.

Interface on the other hand just contains a method signature minus the body and it is to be always implemented by the class extending it.
Рекомендации по теме
visit shbcf.ru