DEV Community

Discussion on: Abstract Classes in PHP

Collapse
 
ddarrko profile image
Daniel

This is not a good example of an abstract class.

In your example you are adding another method to call the abstract parent method. You could (and should) just call that method directly... otherwise you are still implementing duplicate functionality across all of your child classes and you may as well just have used an interface.

Collapse
 
naveenkolambage profile image
Naveen Dinushka

Hmm sure