what is interface in php? how it is use?

Answer Posted / raju

Interface gets useful when you need to extend a class from
more than one parent class since class can not do this.

Why would you want to implement just a single interface on a
class. After all, a class already has everything that an
interface has.

Is This Answer Correct ?    14 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to add 301 redirects in PHP?

668


What is $_ get and $_ post in php?

704


Tell me how to find the position of the first occurrence of a substring in a string?

732


Can we override static method?

728


Can we learn php without html?

748


What are the difference between abstract class and interface in oops?

735


What are the different types of PHP arrays?

804


How to make horizonatl menu and vertical menu responsive

2067


How many escape sequences are recognized in double-quoted strings in php?

747


What are the benefits of composer?

745


What is singleton design pattern in php?

738


What is scope of variable in php?

797


Code to open file download dialog in PHP?

761


What are the methods to submit form in php?

751


Is not null in php?

697