Archive for 'OOPS'
Day 1
In PHP5, all constructors are named __construct(). That is, the word construct prefixed by two underscores. Other then this name change, a constructor works the same way.
Also, the newly added __destruct() (destruct prefixed by two underscores) allows you to write code that will be executed when the object is destroyed.
1. Public is the most visible, making methods accessible to everyone and properties readable and writable by everyone.
2. Protected makes members accessible to the class itself and any subclasses as well as any parent classes.
3. Private makes members only available to the class itself.

