Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What is the difference between an interface and an abstract class in PHP?

  1. A An interface declares method signatures only and a class may implement many; a class may extend only one abstract class
  2. B An abstract class cannot contain methods
  3. C Interfaces can hold state
  4. D They are identical
Answer

An interface declares method signatures only and a class may implement many; a class may extend only one abstract class

Use an interface for the contract and an abstract class where subclasses genuinely share implementation and state.

All Php MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as