Latest Posts

PHP class constructor and destructor with example 2020



PHP out of the box provides us few magic methods. Constructor and destructor are the important magic methods. So when we create a class object (Initialize a class). It Constructor function fires automatically. Now when we delete the variable where we stored the class object refrence then destructor function fires. Have a look on this […]