1.__construct ()
Instantiating an object is called automatically. Call __construct when __construct and a function that has the class name as the function name are present, and the other is called without a back.
The function with the class name as the function name is the old version of the constructor.
2.__destruct ()
When an object is deleted or an object operation ends, it is called.
3.__call ()
object to invoke a method. If the method does not exist, call __call this method
4.__get ()
Reads an object property, if the object property is private, it is called
5.__set ()
When assigning a value to an object property, it is called if the property is private.
6.__tostring ()
It is called when an object is printed.
7.__clone ()
Called when cloning an object, such as: $a =new test (); $a 1=clone $a;
8.__sleep ()
Serialize was called before, if the object is larger, want to cut something in the serialization can use it.
9.__wakeup ()
Unserialize is called to do some initialization of the object.
10.__isset ()
Detects whether a property of an object exists and is called when the detected property is private.
11.__unset ()
Deleting an object property is called if the deleted object property is private.
12.__set_state ()
Called when the Var_export is called. Use the return value of __set_state as the return value of Var_export.
13.__autoload ()
When an object is instantiated, the method is dropped if the corresponding class does not exist.
http://www.bkjia.com/PHPjc/736805.html www.bkjia.com true http://www.bkjia.com/PHPjc/736805.html techarticle 1.__construct () instantiates an object that is automatically called. Call __construct when __construct and a function that has the class name as the function name are present, and the other is called without a back. The class name is the function name of the letter ...