New features of classes (class) in PHP5
/******************************/
Author: older Youth
E_mail:wenadmin@sina.com
/*****************************/
PhP5 added a lot of new functions and features, but in the latest CHM manuals are not reflected in the online manual to find, annoying Ah!!!
No more nonsense, to see php5 in the new class contrast PHP2 class has what the characteristics.
1/Plus access control: using private/public/protected features
2/Added the concept of interface and abstract class, interface/abstract, unfortunately is the inheritance of the class or tree-like single inheritance.
3/Can define final function, cannot override this function in parent class
4/finally can be defined in the class static variables, in PHP can only be defined in the function,
static $AA = nulll;
The Const method is also provided
Const Mystatic = ' aaaaaa ';
5/New provides a self internal method
Echo self::mystatic;
6/Added the following internal features
__construct () initialization
__destruct (); Unloading
__get (); The organization returns some of the variable values in the class.
__set (); The organization assigns values to certain variable values in the class.
__call (); When you call a function of a nonexistent class, you have to deal with the method
__clone (); Copy object with
__sleep (); When serializing, use the
__weekup (); When the reverse sequence is used
7/The Default object assignment takes the form of an application, such as:
$object 2 = $object 1
$object 2 Gets a $object1 reference, not a copy in memory
8/ Provides the reflection API, which is used primarily to display the structure and statistics of the Class/function Province, a brand new thing that is hard to say, (though very powerful, but I still haven't found "where the hero can use")
9/provides an enumeration function for class objects that can be used to handle global variables in an object with a for loop.
10/provides a __autoload () function, used to automatically load class declaration file
Detailed information: http://www.php.net/manual/en/language.oop5.basic.php
</