PHP construction Method Function__constructz () {
}
PHP5 with destructor function__destruct () {}//cannot have any arguments
Static properties can be declared statically by means of a static method. This is present in memory.
Static methods in a class in PHP can only access static properties, and non-static methods can only access non-static properties.
Self is similar to $this, but self is used to invoke static properties, Self:: Property name (does not point to any instantiated object)
Final is used to define the classes and methods that cannot be used to define member properties. Because final is a constant defined, the constants defined in PHP are define (); The final defined class cannot be inherited. Methods that use final markup cannot be overridden.
Define () defines constants using this function.
Const defines a keyword for a constant in a class.
__tostring () If this is written in the class, Echo can print out the object correctly (that is, which class $pag = new Animal ()) value is referenced.
__clone clones a function that has the same properties.
__call () This is the wrong way to write this method in the class, then we call the non-existent method inside the class will prompt the error, but the program continues to run.
__autoload () automatic loading in the development of the time to include a lot of time to add some files, if you use this method so it is not so troublesome, and then use the time will be automatically loaded