what is interface in php? how it is use?
Answer Posted / sivannarayana
interface = multiple inheritance
means:
An interface is a named collection of method definitions, without implementation.
example:
interface interfaceName{
public function func1();
public function func2();
}
//we will use this interface as
class ClassName implements interfaceName
{
//note all interface func's must implement here
}
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Which is better php or nodejs?
Whether php supports microsoft sql server?
Tell me what is pear?
Explain what are psrs? Choose 1 and briefly describe it?
What is laracast?
Does php support multiple inheritance?
What is difference between array_merge and array_combine?
Is array a key php?
What is composer used for?
Do you know how to delete a file from the system?
Tell me how can we define a variable accessible in functions of a php script?
How we load all classes that placed in different directory in one php file , means how to do auto load classes.
Tell me which function gives us the number of affected entries by a query?
What is the use of "enctype" attribute in a html form?
Should I use mysqli or pdo?