Program 1
<html>
<head><title>Demo</title></head>
<body>
<center>
<?php
class Base
{
public function calculation($m,$n)
{
echo "Addtion is : ".$m+$n;
}
}
class Derived extends Base
{
public function calculation($m,$n)
{
echo "Sub is : ".$m*$n;
}
}
// Object Creation
$d=new Derived();
$d->calculation(50,30);
?>
</center>
</body>
</html>