摘要:
<?// animal.phpclass Animal { private $weight; public function getWeight() { return $this->weight; } public function setWeight($w) { $this->weight = $w; }}$myDog = new Dog();$myDog->setWeight(20);echo "Mydog's weight is ".$myDog->getWeight().'<br>';$myDog-& 阅读全文