PHP program to demonstrate the example of a simple interface
<?php
//PHP program to demonstrate the example of
//simple interface.
interface Inf
{
public function fun1();
public function fun2();
}
class Sample implements Inf
{
public function fun1()
{
printf("fun1() called<br>");
}
public function fun2()
{
printf("fun2() called<br>");
}
}
$obj = new Sample();
$obj->fun1();
$obj->fun2();
?>
Output
fun1() called
fun2() called
