3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month_temp = "78, 60, 62, 68, 71, 68, 73, 85, 66, 64, 76, 63, 81, 76, 73, 68, 72, 73, 75, 65, 74, 63, 67, 65, 64, 68, 73, 75, 79, 73"; $temp_array = explode(',', $month_temp); $tot_temp = 0; $temp_array_length = count($temp_array); foreach($temp_array as $temp) { $tot_temp += $temp; } $avg_high_temp = $tot_temp/$temp_array_length; echo "Average Temperature is : ".$avg_high_temp."<br>"; sort($temp_array); echo "<br> List of seven lowest temperatures : "; for ($i=0; $i<5; $i++) { echo $temp_array[$i].", "; } echo "<br>List of seven highest temperatures : "; for ($i=($temp_array_length-5); $i<($temp_array_length); $i++) { echo $temp_array[$i].", "; } ?>

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.0110.00316.63
8.3.50.0120.00922.00
8.3.40.0110.01118.84
8.3.30.0100.00719.22
8.3.20.0070.00020.20
8.3.10.0000.00823.70
8.3.00.0080.00019.50
8.2.180.0070.00718.25
8.2.170.0000.01422.96
8.2.160.0130.00720.34
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00726.16
8.2.120.0050.00222.11
8.2.110.0090.00022.20
8.2.100.0120.00017.72
8.2.90.0080.00019.21
8.2.80.0060.00318.04
8.2.70.0000.00817.63
8.2.60.0000.00817.80
8.2.50.0080.00018.07
8.2.40.0090.00019.77
8.2.30.0070.00018.02
8.2.20.0040.00417.70
8.2.10.0040.00418.21
8.2.00.0040.00417.77
8.1.280.0110.00425.92
8.1.270.0060.00323.92
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0030.00723.84
8.1.230.0040.00719.09
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0030.00618.64
8.1.160.0040.00421.93
8.1.150.0040.00418.74
8.1.140.0000.00817.54
8.1.130.0000.00717.87
8.1.120.0040.00417.44
8.1.110.0050.00217.34
8.1.100.0040.00417.45
8.1.90.0080.00017.39
8.1.80.0070.00017.48
8.1.70.0000.00717.39
8.1.60.0000.00917.61
8.1.50.0000.00917.55
8.1.40.0040.00417.57
8.1.30.0030.00617.47
8.1.20.0040.00417.68
8.1.10.0040.00417.53
8.1.00.0040.00417.52
8.0.300.0000.00820.66
8.0.290.0040.00417.18
8.0.280.0000.00718.48
8.0.270.0060.00318.24
8.0.260.0050.00217.17
8.0.250.0060.00017.02
8.0.240.0070.00017.07
8.0.230.0040.00417.06
8.0.220.0000.00716.90
8.0.210.0030.00316.95
8.0.200.0030.00316.96
8.0.190.0000.00816.96
8.0.180.0060.00317.00
8.0.170.0040.00416.98
8.0.160.0000.00716.94
8.0.150.0030.00516.98
8.0.140.0060.00316.78
8.0.130.0040.00413.38
8.0.120.0030.00616.94
8.0.110.0000.00716.86
8.0.100.0080.00016.81
8.0.90.0000.00716.82
8.0.80.0120.00916.87
8.0.70.0070.00016.93
8.0.60.0040.00416.81
8.0.50.0080.00016.98
8.0.30.0080.01417.34
8.0.20.0120.00617.40
8.0.10.0000.00717.15
8.0.00.0080.01116.78
7.4.330.0020.00315.14
7.4.320.0030.00316.66
7.4.300.0000.00716.44
7.4.290.0040.00416.52
7.4.280.0090.00016.48
7.4.270.0000.00716.44
7.4.260.0090.00016.62
7.4.250.0040.00416.50
7.4.240.0040.00316.64
7.4.230.0000.00716.71
7.4.220.0040.01416.68
7.4.210.0090.00816.60
7.4.200.0030.00316.71
7.4.190.0000.00716.67
7.4.160.0040.01216.52
7.4.150.0060.01017.40
7.4.140.0100.00717.86
7.4.130.0090.00916.52
7.4.120.0120.00516.57
7.4.110.0080.01216.45
7.4.100.0060.01316.37
7.4.90.0070.01016.40
7.4.80.0180.00519.39
7.4.70.0000.01616.47
7.4.60.0130.00716.41
7.4.50.0040.00416.34
7.4.40.0030.01416.48
7.4.30.0080.00816.75
7.4.00.0100.00614.82
7.3.330.0000.00513.16
7.3.320.0000.00613.26
7.3.310.0070.00016.18
7.3.300.0030.00316.39
7.3.290.0060.00916.36
7.3.280.0090.01016.36
7.3.270.0080.00817.40
7.3.260.0050.01316.27
7.3.250.0110.00616.51
7.3.240.0090.00916.24
7.3.230.0130.00616.56
7.3.210.0000.02016.59
7.3.200.0110.00619.39
7.3.190.0170.00316.47
7.3.180.0100.01016.40
7.3.170.0090.01316.71
7.3.160.0120.00316.39
7.3.120.0040.01314.99
7.3.110.0110.00714.85
7.3.100.0110.00014.96
7.3.90.0030.01414.76
7.3.80.0100.00614.65
7.3.70.0030.00814.87
7.3.60.0030.01414.79
7.3.50.0060.00315.00
7.3.40.0050.00314.58
7.3.30.0070.01014.70
7.3.20.0030.01416.76
7.3.10.0070.00716.46
7.3.00.0060.00616.64
7.2.330.0180.00316.59
7.2.320.0110.01116.80
7.2.310.0140.00316.72
7.2.300.0080.00816.79
7.2.290.0160.00016.49
7.2.250.0000.01715.11
7.2.240.0100.01015.04
7.2.230.0040.01514.86
7.2.220.0070.00715.13
7.2.210.0030.01314.96
7.2.200.0060.00615.07
7.2.190.0070.00715.23
7.2.180.0030.00615.18
7.2.170.0000.01415.06
7.2.00.0030.00919.29
7.1.330.0080.00415.82
7.1.320.0000.01115.73
7.1.310.0050.00515.87
7.1.300.0000.01115.47
7.1.290.0030.00715.87
7.1.280.0040.00415.81
7.1.270.0070.00716.02
7.1.260.0030.00915.75
7.1.100.0030.00717.94
7.1.70.0050.00517.22
7.1.60.0100.01419.46
7.1.50.0030.02016.92
7.1.00.0070.07322.22
7.0.200.0070.00716.78
7.0.140.0000.07722.00
7.0.70.0030.08321.63
7.0.60.0070.04021.77
7.0.50.0030.07022.04
7.0.40.0070.07720.02
7.0.30.0030.05020.18
7.0.20.0070.06720.13
7.0.10.0070.08320.09
7.0.00.0000.09020.07
5.6.280.0030.07320.89
5.6.220.0100.04020.67
5.6.210.0100.07020.64
5.6.200.0030.08720.94
5.6.190.0030.08321.16
5.6.180.0130.07321.10
5.6.170.0130.06721.00
5.6.160.0000.08021.02
5.6.150.0130.08021.02
5.6.140.0100.07721.06
5.6.130.0100.08320.88
5.6.120.0070.07321.16
5.6.110.0030.04721.11
5.6.100.0030.06021.00
5.6.90.0030.07021.09
5.6.80.0100.07720.39
5.6.70.0000.06720.51
5.6.60.0070.07720.39
5.6.50.0100.06020.46
5.6.40.0030.06320.46
5.6.30.0030.08320.32
5.6.20.0100.07720.36
5.6.10.0070.08020.52
5.6.00.0070.07720.35
5.5.360.0030.07720.31
5.5.350.0030.04020.46
5.5.340.0070.07320.78
5.5.330.0030.08720.91
5.5.320.0000.06020.86
5.5.310.0070.07720.82
5.5.300.0130.07320.91
5.5.290.0130.07320.91
5.5.280.0030.08020.88
5.5.270.0100.05320.89
5.5.260.0030.05020.78
5.5.250.0070.04720.70
5.5.240.0070.07320.21
5.5.230.0000.08320.26
5.5.220.0000.08320.30
5.5.210.0070.08020.21
5.5.200.0030.06020.22
5.5.190.0030.08020.18
5.5.180.0130.05320.18
5.5.160.0030.08020.08
5.5.150.0070.03720.11
5.5.140.0000.06020.14
5.5.130.0070.03720.21
5.5.120.0100.07320.23
5.5.110.0030.08320.10
5.5.100.0100.07719.98
5.5.90.0000.07320.05
5.5.80.0070.07720.12
5.5.70.0100.07720.08
5.5.60.0100.06720.04
5.5.50.0070.07020.14
5.5.40.0100.07320.05
5.5.30.0030.07720.04
5.5.20.0000.08720.09
5.5.10.0070.07720.05
5.5.00.0030.07019.96
5.4.450.0070.06019.47
5.4.440.0200.06719.13
5.4.430.0100.05319.23
5.4.420.0000.06019.22
5.4.410.0030.07719.25
5.4.400.0070.07719.13
5.4.390.0000.08318.87
5.4.380.0000.07719.02
5.4.370.0030.06019.12
5.4.360.0000.08019.13
5.4.350.0000.04019.04
5.4.340.0000.07718.96
5.4.320.0000.08019.23
5.4.310.0000.04719.12
5.4.300.0000.05019.12
5.4.290.0000.04018.79
5.4.280.0000.04018.89
5.4.270.0030.06018.80
5.4.260.0100.07319.04
5.4.250.0030.05718.94
5.4.240.0000.08019.14
5.4.230.0030.07319.13
5.4.220.0070.08019.02
5.4.210.0000.05718.84
5.4.200.0030.07318.89
5.4.190.0030.05719.04
5.4.180.0030.07719.12
5.4.170.0100.05318.80
5.4.160.0000.08319.09
5.4.150.0000.08718.79
5.4.140.0030.07316.27
5.4.130.0000.06316.11
5.4.120.0030.07316.33
5.4.110.0030.07016.21
5.4.100.0000.06316.25
5.4.90.0030.05016.34
5.4.80.0000.07716.35
5.4.70.0030.05716.20
5.4.60.0030.07716.29
5.4.50.0070.07016.31
5.4.40.0030.07316.20
5.4.30.0000.05316.23
5.4.20.0000.07016.27
5.4.10.0070.07316.23
5.4.00.0030.05015.80
5.3.290.0030.07315.80
5.3.280.0030.08015.80
5.3.270.0000.05715.80
5.3.260.0000.08315.80
5.3.250.0070.07315.80
5.3.240.0030.07715.80
5.3.230.0030.06315.80
5.3.220.0000.06015.80
5.3.210.0030.08015.80
5.3.200.0000.08315.80
5.3.190.0030.08015.80
5.3.180.0030.05015.80
5.3.170.0030.06015.80
5.3.160.0030.07715.80
5.3.150.0070.07715.80
5.3.140.0070.04315.80
5.3.130.0030.05315.80
5.3.120.0100.06315.80
5.3.110.0030.06715.80
5.3.100.0070.07015.80
5.3.90.0030.06315.80
5.3.80.0030.05715.80
5.3.70.0030.06315.80
5.3.60.0030.07315.80
5.3.50.0030.06315.80
5.3.40.0030.07315.80
5.3.30.0030.07315.80
5.3.20.0070.06715.80
5.3.10.0000.06015.80
5.3.00.0030.07015.80
5.2.170.0000.05715.80
5.2.160.0030.06315.80
5.2.150.0030.06715.80
5.2.140.0070.05315.80
5.2.130.0030.06015.80
5.2.120.0000.06315.80
5.2.110.0030.06315.80
5.2.100.0070.06015.80
5.2.90.0070.05715.80
5.2.80.0000.06715.80
5.2.70.0070.06315.80
5.2.60.0070.06015.80
5.2.50.0030.06315.80
5.2.40.0030.05015.80
5.2.30.0030.06315.80
5.2.20.0030.06315.80
5.2.10.0000.05715.80
5.2.00.0000.05015.80
5.1.60.0000.05315.80
5.1.50.0100.05015.80
5.1.40.0000.04315.80
5.1.30.0000.06015.80
5.1.20.0070.05015.80
5.1.10.0030.05715.80
5.1.00.0070.04015.80
5.0.50.0030.04315.80
5.0.40.0030.04315.80
5.0.30.0030.05715.80
5.0.20.0000.03715.80
5.0.10.0030.04315.80
5.0.00.0000.05715.80
4.4.90.0000.03315.80
4.4.80.0000.04015.80
4.4.70.0000.04015.80
4.4.60.0000.02315.80
4.4.50.0000.03715.80
4.4.40.0000.04715.80
4.4.30.0000.03715.80
4.4.20.0030.03015.80
4.4.10.0030.01715.80
4.4.00.0000.05315.80
4.3.110.0000.03315.80
4.3.100.0030.03315.80
4.3.90.0030.03015.80
4.3.80.0000.05315.80
4.3.70.0030.03315.80
4.3.60.0000.03315.80
4.3.50.0000.03715.80
4.3.40.0000.05015.80
4.3.30.0030.03715.80
4.3.20.0030.03715.80
4.3.10.0070.02315.80
4.3.00.0030.03015.80

preferences:
60.44 ms | 401 KiB | 5 Q