quick links

Method overriding?

Method in child class with same name, same parameter and same access as parent class is call method overloading.

class AA {
public function output($args) {
echo "\n Parent - the parameter value is $args";
}
}

class BB extends AA {
public function output($args) {
echo "\n Child - the parameter value is $args";
}
}

$obj1 = new AA;
$obj2 = new BB;

$obj1->output('class AA');
$obj2->output('class BB');

 

About Us

Joomla Web Solution

We love working with PHP, HTML5, CSS3, jQuery and the most-loved content management framework in the world, Joomla!

LIKE US ON FACEBOOK