Наследование классов
Primary tabs
name = $text; } function get_name() { return $this->name; } } class Lion extends Animal { var $name; function roar() { echo $this->name, "Growls!
"; } function set_name ($text) { $this->name = strtoupper($text); } } $lion =new Lion; $lion->set_name ("Bonifacii"); $lion->roar(); ?>
- Log in to post comments
- 1707 reads