php - Why not always use abstract instead of interface? -
in php why not use abstract instead of interface? know following:
use interface when want force developers working in system (yourself included) implement set number of methods on classes they'll building.
use abstract class when want force developers working in system (yourself included) implement set numbers of methods , want provide base methods them develop child classes.
if why not use abstract (when want functionality of interface) without providing base methods?
because class can implement multiple interfaces, extend single abstract class.
Comments
Post a Comment