PHP OOP : Interfaces

What is Interfaces?

  • Interfaces help us to use multiple classes in a single class inherit.
  • Interfaces are declared with the interface keyword.
  • Derived class is called derived class.
  • object not be created in interface.
  • Property should not be defined in interface(class).
  • All interface methods must be public.
  • All methods in an interface are abstract.
  • To implement an interface, a class must use the implements keyword.

Example :-

vikashdev k
Latest posts by vikashdev k (see all)
Tagged : / / / / / / / / / / / / / /
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x