3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class induk { protected $A=12; protected $T=10; protected function hitung_rumus($r) { return $this->A=$alas; return $this->T=$tinggi; echo $v = 0.5*$alas*$tinggi; } public function cetak() { echo $this->r=$rumus; } } class anak extends induk { protected $miring; protected function sisi_miring($r) { echo $this->cari($r); } } class cucu extends anak { public $pesan; private function keliling($r) { echo $this->cari($r); } } $ob = new induk(); $ob2= new anak(); $ob3= new cucu(); echo PHP_EOL; $ob2->panggil(sisi_miring);
based on KQIU3
Output for 7.0.28 - 7.3.0rc3
Fatal error: Uncaught Error: Call to undefined method anak::panggil() in /in/FCCbY:39 Stack trace: #0 {main} thrown in /in/FCCbY on line 39
Process exited with code 255.
Output for 5.6.38
Fatal error: Call to undefined method anak::panggil() in /in/FCCbY on line 39
Process exited with code 255.