Also, to add to my overloading example, I forgot that overloading is more than just the arguments given, but also the data type. The arguments just made it easier for me to compare it to PHP. It's been so long since I've used data types that I completely forgot until now.
What reminded me was that, today, I got bored and borrowed PHP 5 for Dummies since I'm generally new to PHP 5 (just upgraded from 4) and wanted to see if I missed anything beyond the advancements in OOP. Apparently, PHP.net is a much more thorough resource, but I did learn more string and array functions than I'll ever use.
One thing that bothered me in the book was when the author decided to mark elements of OOP that PHP doesn't support, and one of those things multiple inheritance.... The other was polymorphism. This instantly grabbed my attention as I said to myself, "What? Yes it does. What have we been discussing all of this time?" Here's what the book said:
PHP 5 For Dummies wrote:Object-Oriented concepts PHP 5 omits
[...]
Polymorphism: PHP does not allow more than one method, even a constructor, to have the same name in a class. Therefore, you can't implement polymorphism as you're used to doing. You can't have two or more methods with the same name in the same class that accept different types or number of variables. Some people use switches and other mechanisms to implement the functionality of polymorphism.
What?? This woman's credentials consist of over 20 years of programming experience. I mean, I caught one or two typos in the book, but that's a pretty big deal to confuse polymorphism and overloading in a book aimed at beginners.
I understand that the definition of polymorphism isn't always clear (as this discussion has proven), but overloading as always seemed clear to me, since I utilized it so often. Could it be that the author didn't mixed them up?