Characteristics:
1: A class that is defined as abstract and cannot be instantiated;
2: Any class if there is at least one method within it that is declared abstract;
3: is defined as an abstract method, only the method body (including parameters), there is no specific implementation process;
4: When a subclass inherits the abstract parent class, the subclass must implement all the abstract methods in the parent class, and the access control of the abstract method must be the same as the parent class, (or looser);
For example:abstract protected function test (); When the modifier of the parent class's abstract method is protected, the implementation of its subclass method must be a modifier of: protected or public, not private;
5: If an optional parameter is defined in the abstract method of the parent class, an optional parameter must also be defined in the subclass, and when the optional argument of the parent class is one, the optional parameters of the subclass are at least one, or two, three., and the subclass is defined in the sub-class.
An optional parameter, which can be undefined or defined in the parent class;
Abstract classes and abstract methods in PHP