已采納回答 / 保龍
你new錯了,要new Player類<?phpclass Human{ public $name; public $height; public $weight; public function eat($food){ echo $this->name."'s eating ".$food."\n"; }}class Player extends Human{ function __construct($name,$height,$weight){ $this->name=$nam...
2016-05-12
已采納回答 / 吳智彬
析構函數,在實例化的時侯會被自動調用,你實例化了兩個對象,會調用兩次析構函數,這理解是對的。對于代碼的是幕客網提供的編輯器,在你輸入內容的左上角有代碼語言可以選擇,選擇了對應的語言就會根據語言提供高亮顯示效果。<...圖片...>
2016-05-08