PHP5 OOP limitations

Building a program using PHP, I am seeing some of the limitations that it has.  Being used to Java programming, I am used to creating class constructors, get and set methods, and the famous method (function) overloading.  Unfortunately, PHP5 does not allow method (function) overloading.

For example, the code shown below will not work in PHP.  If this was Java, the methods below will work fine.


class Overload{


getOne($another, $number){


Therefore, do not do method (function) overloading in PHP5.  The program will not work if you do.  Furthermore, no error messages are shown on screen.

The following are formatted badly since cutting and pasting removed all the spaces.  The Gregorian calendar function works with dates from 2000 up to 2099.

Generic calendar function can be seen at

Gregorian calendar that extends from Generic calendar can be seen at

Leave a Reply