Overview of PHP-oriented programming is a method of usual use of project development. This section we will show how object-oriented programming (OOP, Object Oriented Programming) is performed in PHP, and explain how to reduce encoding and increase quality by using some OOP concepts and PHP skills. Before applying the PHP class, please check the relevant object-oriented programming books, understand the basic knowledge of object-oriented and classes. How to create an instance object of class and classes? In the PHP, you can complete the package through class, let's take a simple example: Php // Define class class classname {// Define data members Use "var", data members can Is an integer, an array, a associated array (Associative Array) or an object var $ value; / / method is defined in the form in the class, and you can use $ this-> name when accessing the class member variables in the method. , Such as $ this-> setValue function setValue ($ V) {$ this-> value = $ v;} function getValue () {return $ this-> value;}} // Create an object with "new" operator $ Obj = new classname; $ OBJ-> SetValue ("Hello, PHP World!"); $ obj-> getValue ();?> Inherits the "extend" keyword. For example: Php class HelloPHPWorld extends ClassName {var $ message; function setMessage ($ msg) {$ this-> message = $ msg;} function getMessage () {return $ this-> message;}}> "HelloPHPWorld"? The object of class now has all the data members and methods of the ClassName, and there are also their own data members and methods. We can use: $ obj2 = new hellophpworld; $ obj2-> setValue ("i love world!"); $ Obj2-> setmessage ("i love php!"); PHP now does not support multiple inheritance, so you can't be from two Or two or more class are derived from new classes.