Inheritance of classes in PHP
1, subclass inherits the parent class with the Extends keyword 2, the subclass can inherit from only one parent class, but the parent class inherits from another Class 3, inherits, can inherit the public/protected property and method of the parent class, cannot inherit the private property and Method 4, subclass, can declare the property and method with the same name as the parent class to overwrite, But inherited permissions can only be the same or more relaxed, not more stringent, such as the parent class declared protected $a, the subclass can not declare the private $a, can only be public or protected
http://www.bkjia.com/PHPjc/1071709.html www.bkjia.com true http://www.bkjia.com/PHPjc/1071709.html techarticle the class in PHP inherits 1, the subclass inherits the parent class with the Extends keyword 2, the subclass can inherit from only one parent class, but the parent class may inherit from another class 3, inherits, can inherit the parent class's public ...