__construct (): constructor
__destruct (): destructor
__call () __call () is called when a non-accessible method is called in the object.
When __get () reads the value of an inaccessible property, __get () is called.
__set () __set () is called when a value is assigned to an unreachable property.
__isset () __isset () is called when isset () or empty () is called on a non-accessible property .
__unset () __unset () is called when unset () is called on a non-accessible property.
__sleep () is often used to commit uncommitted data, or similar cleanup operations. At the same time, if there are some very large objects, but do not need to save all, this function is very useful.
__tostring () How to respond when a class is treated as a string
__clone () When replication is complete, if the __clone () method is defined, the __clone () method in the newly created object (copy generated object) is called and can be used to modify the value of the property, if necessary.
PHP Magic Method