3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Kubus { public function set_sisi($s); public function luas_kubus(); public function volume_kubus(); } interface Balok { public function luas_balok($p, $l); public function volume_balok($t); } class Hitung implements Kubus, Balok{ public $p,$l,$sisi; public function set_sisi($s) { $this->sisi = $s; return $this; } public function luas_kubus() { echo "Luas Kubus = " . $this->sisi * 2 . PHP_EOL; return $this; } public function volume_kubus() { echo "Volume Kubus = " . $this->sisi * 3 . PHP_EOL; return $this; } public function luas_balok($p, $l) { $this->p = $p; $this->l = $l; echo "Luas Balok = " . $p * $l . PHP_EOL; return $this; } public function volume_balok($t) { echo "Volume Balok = " . $this->p * $this->l * $t . PHP_EOL; } } $hitung = new Hitung; echo $hitung->set_sisi(4)->luas_kubus()->volume_kubus()->luas_balok(8,4)->volume_balok(2);

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)
8.3.60.0130.00318.43
8.3.50.0130.00718.25
8.3.40.0070.01322.08
8.3.30.0070.00718.85
8.3.20.0070.00024.18
8.3.10.0070.00024.66
8.3.00.0080.00026.16
8.2.180.0120.00625.92
8.2.170.0160.00419.00
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0050.00326.35
8.2.110.0030.00622.29
8.2.100.0090.00319.51
8.2.90.0060.00317.75
8.2.80.0000.00818.74
8.2.70.0000.00917.50
8.2.60.0030.00518.03
8.2.50.0090.00018.05
8.2.40.0030.00619.95
8.2.30.0070.00018.14
8.2.20.0050.00317.98
8.2.10.0030.00619.27
8.2.00.0000.00819.15
8.1.280.0100.00725.92
8.1.270.0040.00423.99
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0060.00320.70
8.1.230.0050.00517.77
8.1.220.0000.00817.76
8.1.210.0030.00618.77
8.1.200.0030.00617.35
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0090.00018.67
8.1.160.0050.00218.91
8.1.150.0040.00418.92
8.1.140.0040.00418.89
8.1.130.0040.00420.14
8.1.120.0040.00417.37
8.1.110.0080.00417.45
8.1.100.0000.00717.53
8.1.90.0070.00017.54
8.1.80.0000.01017.37
8.1.70.0000.00817.37
8.1.60.0040.00417.62
8.1.50.0000.00817.55
8.1.40.0030.00517.50
8.1.30.0060.00317.65
8.1.20.0080.00017.57
8.1.10.0060.00317.46
8.1.00.0070.00317.52
8.0.300.0040.00418.77
8.0.290.0040.00416.58
8.0.280.0040.00418.39
8.0.270.0030.00317.90
8.0.260.0060.00018.58
8.0.250.0040.00416.97
8.0.240.0080.00316.86
8.0.230.0000.00716.83
8.0.220.0000.00716.80
8.0.210.0050.00216.96
8.0.200.0000.00716.80
8.0.190.0030.00617.01
8.0.180.0040.00416.91
8.0.170.0050.00316.97
8.0.160.0040.00416.99
8.0.150.0080.00016.73
8.0.140.0000.00816.84
8.0.130.0050.00013.37
8.0.120.0000.00716.88
8.0.110.0030.00516.92
8.0.100.0070.00016.89
8.0.90.0020.00516.73
8.0.80.0080.00716.87
8.0.70.0050.00216.95
8.0.60.0040.00416.76
8.0.50.0040.00416.75
8.0.30.0040.01317.30
8.0.20.0120.01117.03
8.0.10.0100.01017.09
8.0.00.0140.00717.05
7.4.330.0000.00515.55
7.4.320.0000.00616.63
7.4.300.0000.00616.42
7.4.290.0000.00816.45
7.4.280.0000.00916.59
7.4.270.0040.00416.52
7.4.260.0030.00313.29
7.4.250.0000.00916.62
7.4.240.0030.00516.63
7.4.230.0030.00316.43
7.4.220.0020.00516.65
7.4.210.0090.00516.56
7.4.200.0000.00716.51
7.4.140.0120.00616.52
7.4.130.0150.00716.51
7.4.120.0090.01116.47
7.4.110.0100.01016.47
7.4.100.0090.01116.42
7.4.90.0100.00916.48
7.4.80.0120.00716.50
7.4.70.0110.00816.44
7.4.60.0110.00616.44
7.4.50.0130.00716.48
7.4.40.0120.00716.45
7.4.30.0110.00716.49
7.4.20.0110.00816.45
7.4.10.0110.00716.39
7.4.00.0090.00916.57
7.3.330.0030.00316.13
7.3.320.0000.00613.10
7.3.310.0030.00316.13
7.3.300.0030.00316.17
7.3.290.0110.00716.27
7.3.260.0080.01116.36
7.3.250.0180.00616.49
7.3.240.0100.01016.40
7.3.230.0120.00716.43
7.3.220.0100.00816.38
7.3.210.0100.00916.33
7.3.200.0110.00916.38
7.3.190.0100.00716.34
7.3.180.0110.00716.35
7.3.170.0100.00916.37
7.3.160.0100.00816.37
7.3.150.0120.00716.37
7.3.140.0110.00716.34
7.3.130.0110.00816.28
7.3.120.0090.01016.32
7.3.110.0110.00916.34
7.3.100.0100.00816.25
7.3.90.0100.00916.30
7.3.80.0110.00716.29
7.3.70.0120.00716.30
7.3.60.0110.00816.27
7.3.50.0130.00816.28
7.3.40.0110.00816.31
7.3.30.0110.00816.34
7.3.20.0120.00816.59
7.3.10.0100.00916.48
7.3.00.0160.00816.57
7.2.340.0120.00916.71
7.2.330.0100.01116.53
7.2.320.0120.00816.62
7.2.310.0120.00916.60
7.2.300.0120.00816.58
7.2.290.0150.00716.64
7.2.280.0120.00816.59
7.2.270.0110.00816.64
7.2.260.0110.01016.62
7.2.250.0100.01016.61
7.2.240.0110.01016.62
7.2.230.0120.01016.68
7.2.220.0130.00916.67
7.2.210.0110.01016.61
7.2.200.0120.01216.61
7.2.190.0110.01016.62
7.2.180.0110.01016.59
7.2.170.0120.00916.60
7.2.160.0120.01016.59
7.2.150.0420.00816.82
7.2.140.0140.01116.79
7.2.130.0150.00816.85
7.2.120.0130.00716.75
7.2.110.0130.00716.85
7.2.100.0120.00816.80
7.2.90.0140.00716.83
7.2.80.0110.00916.84
7.2.70.0160.01016.83
7.2.60.0350.01116.81
7.2.50.0120.01016.75
7.2.40.0210.00816.86
7.2.30.0140.00916.80
7.2.20.0170.00716.80
7.2.10.0160.01016.75
7.2.00.0120.00816.99

preferences:
57.22 ms | 401 KiB | 5 Q