What is interface? Why it is used?



What is interface? Why it is used?..

Answer / Ashish Kumar Tripathi

In PHP, an interface is a collection of abstract methods. An interface defines a contract that a class must implement to be considered a valid implementation of the interface.nInterfaces are used to enforce a consistent programming model across multiple classes and promote loose coupling between objects.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

Which variable declarations within a class is invalid in php?

0 Answers  


What is scope of variable in php?

1 Answers  


Does browser understand php?

1 Answers  


Can you specify the "new line" character in single-quoted strings?

1 Answers  


What is the difference between using copy() and move() function in PHP file uploading?

5 Answers  


how to retrieve from database..... this format (PRMRMDU402). firstname= prabhu, lastname=kumar, city=madurai, pincode=624402.... i want first name first two letters and last name last two letters ... city first two letters ... pin code last three letters....

2 Answers  


Specify pre-defined classes in php ?

1 Answers  


What are the data types in php?

1 Answers  


What is session and Cokkies . How it works . tell some thing about Session_id()

1 Answers   DVS, Net Solution, PVWEBCO,


What is php destruct?

1 Answers  


Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?

1 Answers  


Do I need to install php after xampp?

1 Answers  


Categories