3v4l.org

run code in 300+ PHP versions simultaneously
<?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 'hitung keliling'; } } $hitung = new induk(); echo $hitung->A=12; echo $hitung->T=10; echo $hitung->r=0.5*P*T; echo PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Cannot access protected property induk::$A in /in/KQIU3:35 Stack trace: #0 {main} thrown in /in/KQIU3 on line 35
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
61.48 ms | 401 KiB | 8 Q