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