1.__construct()
Instantiated objects are automatically called. __construct is called when __construct and the function with the class name and function name exist at the same time, and the other one is not called.
The function with the class name and function name is the old version of the constructor.
2.__destruct()
Called when deleting an object or when an object operation ends.
3.__call()
The object calls a method. If the method does not exist, call __call this method
4.__get()
Read an object property, if the object property is private it will be called
5.__set()
When assigning a value to an object property, it will be called if the property is private
6.__toString()
Will be called when printing an object.
7.__clone()
Called when cloning an object, such as: $a=new test(); $a1=clone $a;
8.__sleep()
Serialize was called before. If the object is relatively large and you want to delete some things during serialization, you can use it.
9.__wakeup()
Called during Unserialize to do some object initialization work.
10.__isset()
Detects whether an object's attribute exists. It will be called if the detected attribute is private.
11.__unset()
When deleting an object attribute, if the deleted object attribute is private, it will be called
12.__set_state()
Called when var_export is called. Use the return value of __set_state as the return value of var_export.
13.__autoload()
When instantiating an object, if the corresponding class does not exist, this method will be ignored.