<?php class demo { public function display() { echo "you are in the display function"; } } $obj = new demo(); $obj->display();