Constructor in php

By | February 21, 2014

construction is a special function of a class that is automatically executed whenever an object of class instantiated.

In PHP5 constructor name will be __construct(). previous versions of php constructor name will be the name of the class.