Skip to content

Instantly share code, notes, and snippets.

@pavanBS

pavanBS/A.php Secret

Last active June 28, 2017 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pavanBS/62d158b54586c65fdd6abcea531e4eec to your computer and use it in GitHub Desktop.
Save pavanBS/62d158b54586c65fdd6abcea531e4eec to your computer and use it in GitHub Desktop.
<?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