3v4l.org

run code in 300+ PHP versions simultaneously
<?php class induk { protected $alas=10; protected $miring=8; public function setAlas() { return ($this->alas/2); } public function setMiring() { return ($this->miring/2) } } class anak { protected $tinggi= public function hitungTinggi() { } } class cucu { public $pesan private function hitungLuas() { } } $CP2 = new induk(); echo CP2->setAlas(); echo PHP_EOL; echo CP2->setMiring(); echo PHP_EOL ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.2.110.0060.00916.27
7.2.100.0120.00316.26
7.2.90.0020.01216.15
7.2.80.0060.01016.47
7.2.70.0080.00516.71
7.2.60.0050.00816.70
7.2.50.0140.00316.77
7.2.40.0060.00616.80
7.2.30.0090.00716.41
7.2.20.0130.00416.69
7.2.10.0120.00516.33
7.2.00.0040.01416.47
7.1.230.0070.01415.25
7.1.220.0150.00015.42
7.1.210.0060.00615.36
7.1.200.0070.00715.42
7.1.190.0090.00315.25
7.1.180.0040.01115.55
7.1.170.0070.01115.39
7.1.160.0130.00015.59
7.1.150.0040.01115.63
7.1.140.0080.00815.31
7.1.130.0030.01315.45
7.1.120.0040.01215.68
7.1.110.0070.00415.36
7.1.100.0070.00715.51
7.1.90.0160.00015.49
7.1.80.0070.00715.41
7.1.70.0040.01215.58
7.1.60.0120.02033.66
7.1.50.0240.00833.54
7.1.40.0320.00933.35
7.1.30.0280.00533.36
7.1.20.0210.01233.75
7.1.10.0070.00415.60
7.1.00.0000.01215.62
5.6.380.0040.01314.22

preferences:
137.56 ms | 1394 KiB | 7 Q