Many differences occur between the interface and abstract class in php.

  • Abstract methods can declare with protected, public, private. But in case of Interface methods stated with the public.
  • Abstract classes can have method stubs, constants, members, and defined processes, but interfaces can only have constants and methods stubs.
  • Abstract classes do not support multiple inheritance but interface support this.
  • Abstract classes can contain constructors, but the interface does not support constructors.

Note: Our PHP logical questions has been created by seasoned PHP experts. It shall help you to answer some of the most frequently asked questions during a job interview.

BY Best Interview Question ON 06 Jul 2020