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
How to read one character from a file?
How to select a database?
How can cross site request forgery csrf be prevented?
Name and explain five of the PHP error constants?
Is php a mvc?
How to get complete current page url in php?
What is the use of trim function in php?
What is the use of post in php?
What is session management php?
What is the use of die in php?
What is difference between Method overriding and overloading in PHP?
How to remove html tags from data in php?
How do I check if a given variable is empty?
Do you know how to get the ip address of the client?
Can we learn php without html?