Show Output
getArea() . "
"; echo $obj2->getArea() . "
"; // Set $obj1 properties values $obj1->length = 30; $obj1->width = 20; // Set $obj2 properties values $obj2->length = 35; $obj2->width = 50; // Call the methods of both the objects again echo $obj1->getArea() . "
"; echo $obj2->getArea() . "
"; ?>