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
Explain the changes in php versions?
How to create a session? How to remove data from a session?
What is strlen function in php?
Can you specify the "new line" character in single-quoted strings?
How to fix "headers already sent" error in php
How many types of session are there?
Explain how to submit form without a submit button.
How to create a session? How to set a value in session?
How can we automatically escape incoming data?
How to convert a string to uppercase in php?
Where do I run php code?
Tell me how can we determine whether a variable is set?
Tell me how do you execute a php script from the command line?
Which PHP function would you use to send an email?
How long does a session last in php?