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


Please Help Members By Posting Answers For Below Questions

What are the features of php 7?

675


What is the use of callback in php?

683


What does $globals mean?

690


What is helper function?

666


What is difference between post and put in rest?

690






Is uploaded file php?

693


What is the use of explode() function?

758


How to find current date and time?

675


What is a string in r?

664


What is lamp in php?

680


Write a program to display a table of any given number?

640


Xplain is it possible to use com component in php?

671


What does $_ post mean in php?

781


What is php addslashes?

741


What is namespace in php?

717