Inheritance and over-riding...
Posted: Wed Jan 21, 2004 1:15 am
Which output function will be called in the case of the code below?
Code: Select all
class A
{
A() { }
greet() { echo "Greetings from A!"; }
output() { $this->greet(); }
}
class B extends A
{
B() { parent::A(); }
greet() { echo "Greetings from B!"; }
output() { parent::output(); }
}