21 Program to demonstrate method overriding in PHP Atharva Satyendra Agrawal March 23, 2020 Atharva Satyendra Agrawal Program: <?php class Childs { function func() { echo "Child Class <br>"; } } class Parents extends Childs { function func() { echo "Parent Class <br>"; } } $p = new Parents; $c = new Childs; $c->func(); $p->func(); ?> Output: Tweet Share Share Share Related Post