You have an extraneous "$" in this line:
$this->fullname = $this->$name.[color=red]$[/color]this->surname;
Also, a parent class's constructor is not automatically executed unless the child calls it:
class surname extends name {
public $fullname;
function surname() {
parent::name();
$this->fullname = $this->name.$this->surname;
echo $this->fullname;
}
}