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
Is php a strongly typed language?
Which is not a file-related function in php?
Why print_r is used in php?
Tell me what are magic methods?
How do I make a reset button in html?
Can we override static method in php?
What is the difference between mysql_fetch_array() and mysql_fetch_assoc()?
How to send email using php script?
How come the code works, but does not for two-dimensional array of mine?
How can we enable error reporting in php?
What sized websites have you worked on in the past?
Is php a case sensitive language?
What are the correct and the most two common way to start and finish a PHP block of code?
What is data structure in php?
Tell me what is the main difference between require() and require_once()?