<?php 
class World {
    public function 
ShowWorld() {
        print 
'World';
    }
}

class 
Hello extends World {
    public function 
Say() {
        print 
'Hello ';
        
$this->ShowWorld();
    }
}

class 
Hey extends World {
    public function 
Say() {
        print 
'Hey ';
        
$this->ShowWorld();
    }
}

$hello = new Hello();
$hey   = new Hey();

$hello->Say();
print 
'<br />';
$hey->Say();
1