Trying to figure out whether PHP supports features like method overloading, inheritance, and polymorphism, I found out:
- it does not support method overloading
- it does support inheritance
but I am unsure about polymorphism. I found this Googling the Internet:
I should note that in PHP the
polymorphism isn’t quite the way it
should be. I mean that it does work,
but since we have a weak datatype, its
not correct.
So is it really polymorphism?
Edit
Just can’t quite place a definite YES or NO next to PHP supports polymorphism. I would be loath to state: “PHP does not support polymorphism”, when in reality it does. Or vice-versa.
You can label it all you want, but that looks like polymorphism to me.