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
What is cookie and why do we use it?
Tell me how is it possible to know the number of rows returned in result set?
What is better .net or php?
Tell me whether it is possible to share a single instance of a memcache between multiple php projects?
How are php sessions stored?
Can php replace javascript?
What are the design patterns in php?
Tell me how can you pass a variable by reference?
What is encapsulation in php with example?
What is mod_php?
What is split function in php?
Name some of the popular frameworks in php.
How to select a database?
How does php sessions work?
What is a controller php?