What are constructor and destructor in PHP ?

PHP constructor and a destructor are special type functions which are automatically called when a PHP class object is created and destroyed.

Generally Constructor are used to intializes the private variables for class and Destructors to free the resources created /used by class .

What are constructor and destructor in PHP ?
Show Buttons
Hide Buttons