Php object-oriented php constructor function _ constructz () {} destructor function _ destruct () in php5 () {} // static methods and static attributes can be declared without any parameter static. This is in the memory. Php class static php object-oriented
Php constructor function _ constructz (){
}
The Destructor function _ destruct () {}// in php5 cannot contain any parameters.
Static can declare static methods and static attributes. This is in the memory.
Static methods in php can only access static attributes. non-static methods can only access non-static attributes.
Self? Similar to $ this, but self is used to call static properties. self: property name (not pointing to any instantiated object)
Final? Classes and methods cannot be used to define member attributes. Because final defines constants, defining constants in php is define (); classes defined by final cannot be inherited. Methods marked with final cannot be overwritten.
The define () definition constant uses this function.
Const defines the key word of a constant in a class.
_ ToString ()? If you write this in the class, echo can correctly print the object (that is, the reference class $ pag = new animal () value.
_ Clone? Clone? A function with the same attributes.
_ Call () is an error-absorbing method. if this method is written in the class, an error will be prompted when we call a method that does not exist in the class, but the program continues to run.
_ Autoload () automatic loading? During development, you often need to include and load some files. if you use this method, you don't have to worry about it. when you use this method, it will automatically load
?
?
?
?