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 are the difference between overloading and overriding in oops?
How to get the length of string?
Which php function will attach one file to another?
Explain how we can retrieve the data in the result set of mysql using php?
What is the difference between md5(), crc32() and sha1() crypto on php?
Why do we need abstract class in php?
What is a php session?
Explain me what are the main error types in php and how do they differ?
Why should I learn php?
How is a constant defined in a PHP script?
What is difference between count or sizeof function in php?
What is str_replace()?
How do I find environment variables?
How to get the number of characters in a string?
How to call javascript function in php on button click?