PHP - Inheritance and Polymorphism
What will be the output of the following PHP code?
abstract class Calculator {
abstract public function multiply($a, $b);
}
class SimpleCalculator extends Calculator {
public function multiply($a, $b) {
return $a * $b;
}
}
$calc = new SimpleCalculator();
echo $calc->multiply(4, 5);