yola bgmna ???
0 jempol
yolanda
148
2
·
9 tahun, 1 bulan yang lalu
·
0 jempol
class Kucing { public $lucu = true; public $warna; public function __construct($warna) { $this->warna= $warna; } public function meong(){ return "Meong..!!"; } public function menyapa(){ return "Hay, saya si $this->warna"; } } $putih=new Kucing("putih"); $hitam=new Kucing("hitam"); echo $hitam->menyapa(); echo $hitam->meong(); echo $putih->meong();