Skip to content

Instantly share code, notes, and snippets.

@pavanBS

pavanBS/A.php Secret

Last active Jun 28, 2017
Embed
What would you like to do?
<?php
interface A {
public function Compute();
}
interface B extends A {
public function Divide();
}
class C implements B {
public function Divide() {
$var=10;
$var1=2;
$var3=$var/$var1;
echo “division of 10/2 is” . $var3;
}
public function Compute() {
$a=2;
$b=3;
$c=$a*$b;
echo “multiplication of 2*3 is” . $c;
}
}
$obj = new C();
$obj->Divide();
$obj->Compute();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.