} function sub() { $sub=$this->a-$this->b; echo "
sub of a and b is:".$sub; } } $object1 = new ArithmaticOperation(); $object1->add(); $object1->sub(); unset($object1); ?>