class Skin extends Linker { function getCategoryLinks () { [...] return $s; } function getCategories() { $catlinks=$this->getCategoryLinks(); if(!empty($catlinks)) { return ""; } } } class MySkin extends Skin { function getCategoryLinks() { //new way of processing return result; } function getCategories() { $catlinks = $this->getCategoryLinks(); if (!empty($catlinks)) { return new html; } } } create object of new class and use it $x = new MySkin(); $x->getCategories();