PHP magic methods are special types of methods that will run automatically when certain actions are performed on an Object of a Class.
You only define magic methods, you don’t need to call these methods.
List of the PHP magic methods
One thing you can note is that PHP magic methods always start with a double underscore
__construct()– The constructor method runs automatically as soon as an object of the class is created.
__destruct()– The destructor method runs after all the work of an object is finished.