1.__construct ()
The instantiated object is called automatically. Call __construct when __construct and a function with the class name function name exist, and the other does not call back.
The function of the class name is the old version of the constructor.
2.__destruct ()
When an object is deleted or an object operation ends is called.
3.__call ()
object to invoke a method. If the method does not exist, this call __call this method
4.__get ()
Reads an object property and calls it if the object property is private
5.__set ()
When you assign a value to an object property, it is invoked if the property is private
6.__tostring ()
Is invoked when an object is printed.
7.__clone ()
Called when the object is cloned, such as: $a =new test (); $a 1=clone $a;
8.__sleep ()
Serialize is called before, if the object is larger, want to cut a little something in serialization can use it.
9.__wakeup ()
Unserialize is invoked to do initialization work on some objects.
10.__isset ()
Detects whether an object's properties exist if the instrumented property is private and is invoked.
11.__unset ()
When you delete an object property, it is called if the object property being deleted is private
12.__set_state ()
Called when the Var_export is invoked. Use the return value of the __set_state as the return value of the Var_export.
13.__autoload ()
When an object is instantiated, the method is dropped if the corresponding class does not exist.