-
-
Save pavanBS/62d158b54586c65fdd6abcea531e4eec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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