Input
Output
<?php class Rectangle { public $length = 5; public $breadth = 6; public $area; // Default constructor public function __construct() { 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(); ?>