Input
Output
<?php class Rectangle { public $length; public $breadth; public $area; } $r1 = new Rectangle(); $r1->length = 5; $r1->breadth = 6; echo "Enter the length and breadth value: " . $r1->length . " " . $r1->breadth . "\n"; $r1->area = $r1->length * $r1->breadth; echo "Area of the Rectangle: " . $r1->area . "\n"; ?>