Question Detial
- Abstraction are defined using the keyword abstract.
- PHP 5 introduces abstract classes and methods. Classes defined as abstract may not be instantiated (create object).
- To extend the Abstract class, extends operator is used.
- You can inherit only one abstract class at one time extending.
- Any class that contains one abstract method must also be declare as abstract. Methods defined as abstract simply declare the method's signature, they can't define the implementation.
- All methods marked as abstract in the parent's class, declaration must be defined by the child.
- Additionally, these methods must be defined with the same (or a less restricted) visibility (Public,Protected & private).
- Type hint & number of parameter must be match between parent & child class.
Hot Questions
How to Get the Size of all Tables in a database in MySQL?