PHP three major features: encapsulation, inheritance, polymorphism, has been only know its word, but do not understand its meaning and specific use, but the inheritance has the approximate
The advantage is the reusability of the Code,
OOP concept, remember once I went to the interview, people asked me what is oop, and then I answered a lot of what inheritance, encapsulation, polymorphism, etc., and then I asked others
What is OOP, people say is object-oriented, then completely enlightened. Since objects are object-oriented, objects are instantiated from the class,
What is a class? Definition: The nature of the entity and the specific behavior, such as a person who has a name, a gender, he may be a soldier, may be a student, these
It is the behavior that he behaves, called the method in the procedure. Instantiate a specific object through a specific class.
Five scopes for attributes: Public,private,protected,static,final, six scopes of methods: public,protected,
Private,final,abstract,final. Constants are defined in a class by Const, property overloading methods, when a non-existent property is referenced in a class
is called when the __get __set.
Abstract class: Abstracted, declared in the parent class, implemented in subclasses, abstract classes cannot be instantiated and can only be inherited.
Final: Prevent quilt class coverage
Constructors and destructors: __construct,__destruct, in object creation and destruction, and in separate invocations;
Instanceof determine if an object is an instance of a class
Auto-load: __autoload, referencing a class that is not defined in the script, is automatically loaded