Start PHP Code RESULT
Hello, my name is Harry
Hello, my name is Apollo
I'm not going to tell you my name --
Hello, my name is Son of Harry
End PHP Code RESULT
The PHP Code START
class first_class{
    var $name = "Harry";
     
    function first_class( $n) {
        $this->name= $n;
    }
    
    function sayHello() {
        print "Hello, my name is $this->name<br />";
    }
}

class second_class extends first_class {
    function sayHello() {
        print "I'm not going to tell you my name --<br />";
        first_class::sayHello();
    }
}

$test1 = new first_class("Harry");
$test2 = new first_class("Apollo");
$test3 = new second_class("Son of Harry");
$test1->sayHello();
$test2->sayHello();
$test3->sayHello();
The PHP Code END