Method overloading is a partial case of polimorphism. With method overloading we can define different methods with the same name, and these methods can vary on type and a number of arguments. This is especially useful for class constructors. But PHP is a weak-type language and it does not allow several constructors in a class. How we can use method overloading in PHP even it is not a strong-type language?
Continue reading
Constructor overloading in PHP
Leave a reply