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
In how many ways we can retrieve the data in the result set of mysql using php?
What are the differences between require and include?
What is a stored procedure in mysql?
How many escape sequences are recognized in single-quoted strings?
Explain mysql_errno()?
How to get number of elements in an array?
What are the new features available in php 7?
Is php procedural or oop?
Tell me when a conditional statement is ended with an endif?
How is a constant defined in a PHP script?
Do you know what does mvc stand for and what does each component do?
List some string function name in php?
How to check a variable is array or not in php?
What is the difference between substr() and strstr()?
How to remove blank spaces from the string?