class first_class
{
var $name = "Kris";
function first_class( $n )
{
$this->name = $n;
}
function sayHello()
{
print "Hello my name is $this->name
";
}
}
class second_class extends first_class
{
function sayHello()
{
print "I'm not going to tell you my name -- ";
first_class::sayHello();
}
}
$test = new second_class("son of Ron Toupee");
$test->sayHello();
// outputs "I'm not going to tell you my name -- Hello my name is son of Ron Toupee"
?>