17 Program to demonstrate classes and objects in PHP Atharva Satyendra Agrawal March 23, 2020 Atharva Satyendra Agrawal Program: <?php class Student { public $roll_no; public $name; function display() { echo "RollNo: $this->roll_no <br/>"; echo "Name: $this->name <br/>"; } } $s1 = new Student; $s1->roll_no = 4; $s1->name="Atharva"; $s1->display(); ?> Output: Tweet Share Share Share Related Post