3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CP2 { protected $alas; protected $miring; public function set($a,$b) { $this->alas = $a; $this->miring = $b; echo "Alas: ".$this->alas.'.'."Miring: ".$this->miring.'.'; } } class subCP2 extends CP2 { protected $tinggi; protected function tinggi() { $this->tinggi=(pow($this->miring,2)-pow($this->alas,2)); echo "Tinggi Segitiga: ".$this->tinggi; } public function runTinggi() { echo $this->tinggi(); } } $run = new CP2(); $run = new subCP2(); $run->set(2,6); $run->runTinggi(); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Alas: 2.Miring: 6.Tinggi Segitiga: 32

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:
77.01 ms | 404 KiB | 9 Q