Explain inheritance in PHP.
Answers
Answered by
0
Answer:
Inheritance in OOP = When a class derives from another class.
The child class will inherit all the public and protected properties and methods from the parent class. In addition, it can have its own properties and methods.
An inherited class is defined by using the extends keyword.
Explanation:
Example: check photo
Attachments:
Similar questions
Science,
7 months ago
English,
7 months ago
Social Sciences,
7 months ago
Art,
1 year ago
English,
1 year ago
Accountancy,
1 year ago