PHP - basic concept of Polymorphism

PHP - basic concept of Polymorphism

PHP - basic concept of Polymorphism ?

Polymorphism is basically derived from the Greek which means 'many forms'.
In other words, polymorphism is what join bunch of classes with one interface. polymorphism is a key part of php oops.
As you can see in above image, printer class has a print method which performs multi task, such as print to screen and print to paper.
Also, you can take example of twin brothers, they look like same but have different characters.

 Polymorphism describes a pattern in object oriented programming in which classes have different functionality while sharing a common interface.

Here is a example which tell you about polymorphism : 

Phone: (+91) 8800417876
Noida, 201301