<? class Dog { public $Name; private function getName( ) { return $this->Name; } } class Poodle extends Dog { public function bark( ) { print "'Woof', says " . $this->getName( ); } } $poppy = new Poodle; $poppy->Name = "Poppy"; $poppy->bark( ); if ($poppy instanceof poodle) { } if ($poppy instanceof dog) { } ?>