reference :
https://code.tutsplus.com/tutorials/understanding-and-applying-polymorphism-in-php--net-14362 https://sourcemaking.com/refactoring/replace-conditional-with-polymorphism https://stackoverflow.com/questions/8542661/general-polymorphism-with-php-examples https://stackoverflow.com/questions/6370932/avoiding-if-statements-with-object-oriented-design-php