Richard York

Web Developer, Author, and Artist


Exploring Polymorphism in PHP

September 26, 2008 by Richard

This is one of those weird programming terms that I never bothered to learn, but discovered that I had already been using for a long time.

Polymorphism is an object-oriented programming design pattern. When you create an object, you have one or more methods (or functions) that each have a predefined purpose, each being a tidy, reusable black of code that you can use over and over again. The concept of polymorphism allows you to have one reusable block of code, i.e., a function, and have another reusable block of code that implements the same functionality of the other block verbatim, in addition to extending that functionality in some way.



© Copyright 2014 Hot Toddy, All Rights Reserved.