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);
based on A3PYF

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.0.00.0160.01016.67
7.4.120.0070.01216.44
7.4.110.0100.00816.43
7.4.100.0090.01116.40
7.4.90.0100.00816.45
7.4.80.0130.00616.50
7.4.70.0100.00916.41
7.4.60.0120.00516.47
7.4.50.0140.00516.45
7.4.40.0120.00816.44
7.4.30.0120.00616.50
7.4.20.0110.00716.44
7.4.10.0090.00916.46
7.4.00.0070.01016.57
7.3.240.0090.00916.45
7.3.230.0110.00716.40
7.3.220.0090.00816.37
7.3.210.0070.01116.37
7.3.200.0100.00916.43
7.3.190.0110.00716.35
7.3.180.0100.00716.46
7.3.170.0090.00916.34
7.3.160.0100.00816.36
7.3.150.0130.00616.38
7.3.140.0090.00816.33
7.3.130.0120.00616.23
7.3.120.0090.00916.39
7.3.110.0110.00916.32
7.3.100.0100.00816.31
7.3.90.0100.00916.31
7.3.80.0110.00816.30
7.3.70.0110.00816.30
7.3.60.0100.00916.30
7.3.50.0130.00816.28
7.3.40.0100.01016.32
7.3.30.0120.00816.36
7.3.20.0130.00816.42
7.3.10.0090.01116.33
7.3.00.0160.00916.34
7.2.340.0110.00716.65
7.2.330.0100.00916.48
7.2.320.0100.00816.61
7.2.310.0090.01116.49
7.2.300.0110.00816.64
7.2.290.0120.00716.67
7.2.280.0100.00816.64
7.2.270.0080.00916.61
7.2.260.0080.01016.60
7.2.250.0090.01016.62
7.2.240.0080.01116.60
7.2.230.0100.01016.63
7.2.220.0090.01016.74
7.2.210.0110.01016.66
7.2.200.0110.01116.60
7.2.190.0080.01116.60
7.2.180.0100.01116.58
7.2.170.0110.00916.54
7.2.160.0110.01116.62
7.2.150.0130.00816.65
7.2.140.0120.01316.57
7.2.130.0140.00816.64
7.2.120.0120.00816.55
7.2.110.0130.00816.64
7.2.100.0120.00816.63
7.2.90.0150.00716.68
7.2.80.0110.01016.65
7.2.70.0120.01116.62
7.2.60.0130.01216.65
7.2.50.0110.01016.56
7.2.40.0140.00716.68
7.2.30.0140.01016.69
7.2.20.0140.00916.65
7.2.10.0170.01016.54
7.2.00.0110.00816.65
7.1.330.0230.01015.60
7.1.320.0230.00715.60
7.1.310.0280.00315.79
7.1.300.0150.01815.55
7.1.290.0230.01215.62
7.1.280.0320.00315.82
7.1.270.0250.00615.72
7.1.260.0200.01015.64
7.1.250.0220.00715.52
7.1.240.0190.01015.54
7.1.230.0210.00615.57
7.1.220.0210.00915.59
7.1.210.0160.01415.50
7.1.200.0240.00815.64
7.1.190.0230.00715.47
7.1.180.0240.01115.65
7.1.170.0240.01115.59
7.1.160.0230.01015.56
7.1.150.0200.01015.44
7.1.140.0220.00715.51
7.1.130.0170.01215.74
7.1.120.0190.01115.53
7.1.110.0230.00815.54
7.1.100.0230.01015.60
7.1.90.0230.00915.61
7.1.80.0560.00715.48
7.1.70.0210.00615.44
7.1.60.0190.00815.56
7.1.50.0160.01215.65
7.1.40.0130.01415.69
7.1.30.0300.00415.55
7.1.20.0210.00715.47
7.1.10.0220.00815.50
7.1.00.0360.01215.47
7.0.330.0140.01315.30
7.0.320.0350.00715.49
7.0.310.0190.00715.31
7.0.300.0160.01115.25
7.0.290.0260.00015.29
7.0.280.0260.00915.23
7.0.270.0220.00615.30
7.0.260.0200.00715.33
7.0.250.0370.00715.30
7.0.240.0250.00615.29
7.0.230.0170.01015.23
7.0.220.0200.00715.43
7.0.210.0220.00915.30
7.0.200.0390.00815.18
7.0.190.0280.00015.13
7.0.180.0120.01215.22
7.0.170.0190.00815.27
7.0.160.0240.00315.23
7.0.150.0190.00815.31
7.0.140.0170.01015.28
7.0.130.0190.00615.29
7.0.120.0200.00615.29
7.0.110.0180.00915.43
7.0.100.0440.00815.48
7.0.90.0190.00715.38
7.0.80.0290.00715.17
7.0.70.0150.01115.26
7.0.60.0230.00415.30
7.0.50.0220.00415.23
7.0.40.0240.00315.34
7.0.30.0150.00915.23
7.0.20.0220.00815.19
7.0.10.0200.01215.37
7.0.00.0190.00615.37
5.6.400.0240.01016.21
5.6.390.0180.01016.07
5.6.380.0220.01315.91
5.6.370.0150.01916.07
5.6.360.0200.00915.82
5.6.350.0240.01316.11
5.6.340.0180.01215.86
5.6.330.0140.01416.11
5.6.320.0090.02516.03
5.6.310.0230.00616.21
5.6.300.0230.00616.19
5.6.290.0140.01515.73
5.6.280.0220.00715.82
5.6.270.0220.00716.21
5.6.260.0170.01416.09
5.6.250.0150.01516.07
5.6.240.0230.00716.02
5.6.230.0180.01215.89
5.6.220.0260.00315.97
5.6.210.0250.00615.88
5.6.200.0280.00715.82
5.6.190.0240.00515.95
5.6.180.0210.00616.20
5.6.170.0220.01116.12
5.6.160.0170.01216.09
5.6.150.0200.01015.83
5.6.140.0200.01016.02
5.6.130.0190.01015.95
5.6.120.0160.01316.04
5.6.110.0200.01016.16
5.6.100.0220.01316.11
5.6.90.0230.00616.18
5.6.80.0200.00916.05
5.6.70.0190.01215.98
5.6.60.0220.00815.85
5.6.50.0140.01415.89
5.6.40.0200.01315.99
5.6.30.0280.00015.96
5.6.20.0190.01315.88
5.6.10.0100.01716.00
5.6.00.0230.00815.98
5.5.380.0180.01115.87
5.5.370.0150.01515.79
5.5.360.0200.00815.98
5.5.350.0210.00715.88
5.5.340.0240.00615.90
5.5.330.0180.01716.00
5.5.320.0190.01215.95
5.5.310.0200.01316.02
5.5.300.0120.02015.75
5.5.290.0220.00815.88
5.5.280.0230.00715.96
5.5.270.0210.01516.01
5.5.260.0150.01615.80
5.5.250.0230.00715.95
5.5.240.0150.01715.91
5.5.230.0150.01415.75
5.5.220.0200.00715.95
5.5.210.0170.01015.79
5.5.200.0190.00915.89
5.5.190.0190.01216.03
5.5.180.0220.00615.98
5.5.170.0200.00816.00
5.5.160.0230.00315.94
5.5.150.0170.00915.91
5.5.140.0230.00515.90
5.5.130.0260.00515.95
5.5.120.0140.01415.69
5.5.110.0200.01215.58
5.5.100.0220.00815.77
5.5.90.0080.02015.95
5.5.80.0150.01515.96
5.5.70.0260.00515.95
5.5.60.0240.00415.62
5.5.50.0210.01115.90
5.5.40.0220.00516.00
5.5.30.0210.01215.66
5.5.20.0160.01315.94
5.5.10.0280.00315.98
5.5.00.0110.01615.62
5.4.450.0150.00912.61
5.4.440.0170.00612.82
5.4.430.0090.01412.91
5.4.420.0110.01212.89
5.4.410.0180.00612.85
5.4.400.0130.01612.73
5.4.390.0210.00312.72
5.4.380.0190.00412.77
5.4.370.0160.00612.83
5.4.360.0200.00412.88
5.4.350.0100.01312.71
5.4.340.0130.00912.94
5.4.330.0150.00912.91
5.4.320.0120.01212.96
5.4.310.0180.00413.04
5.4.300.0120.00813.00
5.4.290.0230.00312.71
5.4.280.0170.00712.77
5.4.270.0160.00812.67
5.4.260.0150.00912.66
5.4.250.0140.01012.84
5.4.240.0190.00812.88
5.4.230.0160.00412.89
5.4.220.0120.00912.80
5.4.210.0170.00612.71
5.4.200.0220.00012.78
5.4.190.0230.00312.76
5.4.180.0130.00912.79
5.4.170.0130.01012.74
5.4.160.0130.00912.75
5.4.150.0150.00612.66
5.4.140.0120.00912.66
5.4.130.0180.00912.77
5.4.120.0180.00513.14
5.4.110.0160.00412.61
5.4.100.0180.00312.88
5.4.90.0130.00912.69
5.4.80.0130.00912.89
5.4.70.0120.00912.84
5.4.60.0120.01012.79
5.4.50.0160.00412.86
5.4.40.0140.00712.82
5.4.30.0130.00812.77
5.4.20.0160.00912.61
5.4.10.0110.01112.69
5.4.00.0140.00612.77
5.3.290.0180.00613.18
5.3.280.0160.00813.19
5.3.270.0140.00813.13
5.3.260.0100.01213.11
5.3.250.0230.00013.41
5.3.240.0120.01013.16
5.3.230.0110.01113.20
5.3.220.0110.01113.01
5.3.210.0090.01312.91
5.3.200.0090.01313.00
5.3.190.0130.01012.95
5.3.180.0190.00413.05
5.3.170.0070.01413.21
5.3.160.0140.00713.05
5.3.150.0080.01313.20
5.3.140.0220.00213.28
5.3.130.0130.01013.13
5.3.120.0230.00312.99
5.3.110.0140.00913.00
5.3.100.0100.01013.14
5.3.90.0160.00613.20
5.3.80.0110.01113.05
5.3.70.0120.00912.94
5.3.60.0180.00613.05
5.3.50.0230.00313.12
5.3.40.0150.01113.11
5.3.30.0160.00613.31
5.3.20.0060.01513.02
5.3.10.0130.00912.91
5.3.00.0040.01912.83
5.2.170.0090.01211.99
5.2.160.0130.00712.02
5.2.150.0110.00912.00
5.2.140.0120.00612.00
5.2.130.0040.01511.97
5.2.120.0120.00912.01
5.2.110.0090.01112.12
5.2.100.0120.00612.15
5.2.90.0160.00311.97
5.2.80.0140.00511.97
5.2.70.0100.01011.97
5.2.60.0150.00411.97
5.2.50.0150.00411.99
5.2.40.0080.01011.97
5.2.30.0120.00611.97
5.2.20.0110.00811.97
5.2.10.0090.01211.97
5.2.00.0100.01111.97
5.1.60.0100.00711.97
5.1.50.0130.00311.97
5.1.40.0120.00411.97
5.1.30.0090.00711.97
5.1.20.0070.01011.97
5.1.10.0130.00411.97
5.1.00.0110.00511.97
5.0.50.0060.01111.97
5.0.40.0090.00711.97
5.0.30.0070.00711.97
5.0.20.0070.00711.97
5.0.10.0120.00411.97
5.0.00.0050.00911.97
4.4.90.0060.00511.97
4.4.80.0090.00011.97
4.4.70.0060.00311.97
4.4.60.0000.01111.97
4.4.50.0040.00411.97
4.4.40.0090.00011.97
4.4.30.0070.00411.97
4.4.20.0090.00011.97
4.4.10.0070.00311.97
4.4.00.0080.00011.97
4.3.110.0090.00011.97
4.3.100.0100.00011.97
4.3.90.0070.00311.97
4.3.80.0040.00411.97
4.3.70.0060.00311.97
4.3.60.0110.00011.97
4.3.50.0070.00211.97
4.3.40.0120.00011.97
4.3.30.0040.00411.97
4.3.20.0040.00411.97
4.3.10.0050.00311.97
4.3.00.0040.00411.97