πŸ“Š PHP
Q. What is the difference between abstract classes and interfaces in PHP?
  • (A) Interfaces can have only abstract methods, abstract classes can have both abstract and concrete methods
  • (B) A class can extend only one abstract class, but can implement multiple interfaces
  • (C) Abstract classes can have properties, interfaces cannot
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Explanation: All statements are correct: abstract classes support concrete methods and properties, interfaces only declare methods, and multiple interfaces can be implemented.

Explanation by: Rati Dubey
All statements are correct: abstract classes support concrete methods and properties, interfaces only declare methods, and multiple interfaces can be implemented.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
31
Total Visits
πŸ“½οΈ
3 mo ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
97%
Success Rate