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.0170.00318.56
8.3.50.0120.00522.12
8.3.40.0070.00718.76
8.3.30.0040.01118.98
8.3.20.0040.00420.17
8.3.10.0040.00423.61
8.3.00.0040.00420.79
8.2.180.0070.01016.63
8.2.170.0070.01422.96
8.2.160.0100.00320.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0000.00719.66
8.2.110.0030.00622.16
8.2.100.0060.00617.55
8.2.90.0040.00419.41
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0050.00317.93
8.2.50.0000.00818.07
8.2.40.0040.00419.77
8.2.30.0040.00418.36
8.2.20.0030.00617.79
8.2.10.0000.00818.18
8.2.00.0040.00417.79
8.1.280.0140.00025.92
8.1.270.0040.00423.96
8.1.260.0110.00726.35
8.1.250.0050.00228.09
8.1.240.0090.00023.80
8.1.230.0120.00019.01
8.1.220.0040.00417.76
8.1.210.0050.00318.77
8.1.200.0030.00717.36
8.1.190.0040.00417.13
8.1.180.0040.00418.10
8.1.170.0030.00518.68
8.1.160.0040.00421.96
8.1.150.0040.00418.63
8.1.140.0040.00417.48
8.1.130.0070.00017.86
8.1.120.0000.00717.46
8.1.110.0060.00317.42
8.1.100.0000.00717.51
8.1.90.0040.00417.49
8.1.80.0000.00817.43
8.1.70.0000.00717.39
8.1.60.0080.00017.50
8.1.50.0030.00617.61
8.1.40.0080.00017.45
8.1.30.0080.00017.61
8.1.20.0040.00417.69
8.1.10.0040.00417.59
8.1.00.0000.00717.56
8.0.300.0040.00418.77
8.0.290.0040.00417.28
8.0.280.0030.00318.48
8.0.270.0000.00717.20
8.0.260.0040.00417.28
8.0.250.0070.00016.89
8.0.240.0070.00017.08
8.0.230.0030.00316.95
8.0.220.0070.00016.99
8.0.210.0000.00817.00
8.0.200.0000.00716.88
8.0.190.0040.00416.97
8.0.180.0040.00416.84
8.0.170.0050.00316.99
8.0.160.0040.00416.80
8.0.150.0000.00816.77
8.0.140.0040.00416.78
8.0.130.0070.00013.41
8.0.120.0030.00616.86
8.0.110.0080.00016.86
8.0.100.0000.00716.99
8.0.90.0000.00716.96
8.0.80.0030.01316.84
8.0.70.0050.00216.99
8.0.60.0020.00516.96
8.0.50.0030.00516.93
8.0.30.0080.01117.08
8.0.20.0090.01117.40
8.0.10.0040.00416.82
8.0.00.0110.01016.87
7.4.330.0050.00015.09
7.4.320.0030.00316.52
7.4.300.0070.00016.64
7.4.290.0040.00416.64
7.4.280.0090.00016.54
7.4.270.0030.00316.65
7.4.260.0030.00316.52
7.4.250.0050.00216.64
7.4.240.0060.00216.58
7.4.230.0000.00716.38
7.4.220.0090.00916.58
7.4.210.0100.00516.74
7.4.200.0000.00716.71
7.4.160.0100.00616.48
7.4.150.0180.00617.40
7.4.140.0090.00917.86
7.4.130.0070.01016.47
7.4.120.0120.01216.55
7.4.110.0070.01316.56
7.4.100.0030.01516.67
7.4.90.0030.01716.43
7.4.80.0030.01819.39
7.4.70.0100.01316.66
7.4.60.0060.01216.61
7.4.50.0030.00616.64
7.4.40.0060.00916.64
7.4.30.0100.00716.43
7.4.00.0020.01415.02
7.3.330.0040.00313.09
7.3.320.0000.00613.26
7.3.310.0070.00016.47
7.3.300.0040.00416.36
7.3.290.0070.00716.37
7.3.280.0120.00916.34
7.3.270.0200.00817.40
7.3.260.0070.01016.31
7.3.250.0100.00716.35
7.3.240.0030.01616.45
7.3.230.0090.01416.40
7.3.210.0120.00916.32
7.3.200.0070.01019.39
7.3.190.0100.01016.29
7.3.180.0060.01016.39
7.3.170.0110.00616.69
7.3.160.0060.01016.38
7.3.120.0050.01314.88
7.3.110.0070.01015.04
7.3.100.0100.00514.71
7.3.90.0080.00314.63
7.3.80.0040.01114.99
7.3.70.0040.00614.97
7.3.60.0030.01114.98
7.3.50.0100.00814.79
7.3.40.0080.00815.00
7.3.30.0050.01014.85
7.3.20.0070.00516.71
7.3.10.0050.01016.70
7.3.00.0100.00616.74
7.2.330.0070.01116.52
7.2.320.0060.00916.79
7.2.310.0070.01016.72
7.2.300.0070.01016.48
7.2.290.0120.01216.50
7.2.250.0120.00914.80
7.2.240.0030.01215.03
7.2.230.0080.00615.10
7.2.220.0010.01115.16
7.2.210.0030.01315.27
7.2.200.0030.01215.25
7.2.190.0050.01114.97
7.2.180.0060.00915.15
7.2.170.0100.00815.08
7.2.160.0070.01014.80
7.2.150.0120.00316.93
7.2.140.0030.01017.04
7.2.130.0040.00817.02
7.2.120.0040.01116.84
7.2.110.0070.00516.72
7.2.100.0090.00616.89
7.2.90.0060.01017.00
7.2.80.0070.00916.93
7.2.70.0070.00917.00
7.2.60.0100.01016.96
7.2.50.0030.01216.80
7.2.40.0040.01116.82
7.2.30.0070.00717.00
7.2.20.0050.00716.97
7.2.10.0090.00916.96
7.2.00.0100.00517.70
7.1.330.0030.01115.77
7.1.320.0050.00715.68
7.1.310.0050.01015.96
7.1.300.0030.01015.80
7.1.290.0050.00915.62
7.1.280.0070.01015.79
7.1.270.0050.01015.87
7.1.260.0050.01015.72
7.1.250.0070.00515.64
7.1.200.0060.00615.85
7.1.100.0070.00318.27
7.1.70.0000.00917.26
7.1.60.0090.01519.70
7.1.50.0090.00616.70
7.1.00.0100.07022.46
7.0.200.0000.00816.80
7.0.140.0030.07022.08
7.0.60.0100.03719.94
7.0.50.0070.04317.80
7.0.40.0130.05320.12
7.0.30.0430.06020.21
7.0.20.0100.04720.09
7.0.10.0130.08320.21
7.0.00.0070.08020.33
5.6.280.0070.07020.89
5.6.210.0030.07320.56
5.6.200.0100.08018.22
5.6.190.0070.08020.62
5.6.180.0300.05320.58
5.6.170.0330.06720.44
5.6.160.0070.06320.71
5.6.150.0130.06018.21
5.6.140.0070.05018.13
5.6.130.0030.05718.21
5.6.120.0030.04021.02
5.6.110.0330.06021.01
5.6.100.0100.06720.86
5.6.90.0130.08020.94
5.6.80.0030.03720.39
5.6.70.4170.03720.36
5.5.350.0170.07320.42
5.5.340.0130.06717.91
5.5.330.0070.08720.15
5.5.320.0070.07320.29
5.5.310.0370.04020.50
5.5.300.0070.06017.98
5.5.290.0100.03317.87
5.5.280.0070.03720.88
5.5.270.0000.09020.76
5.5.260.0100.08720.78
5.5.250.0070.05720.70
5.5.240.0170.07020.35
5.4.450.0370.04732.18
5.4.440.0230.05332.17
5.4.430.0270.04730.86
5.4.420.0200.04330.86
5.4.410.0730.04030.86
5.4.400.0400.03030.86
5.4.390.0200.04330.85
5.4.380.0300.05718.65
5.4.370.0330.05318.76
5.4.360.0530.05018.52
5.4.350.0370.06018.63
5.4.340.0330.05018.61
5.4.320.0040.03712.46
5.4.310.0060.03812.46
5.4.300.0040.03812.46
5.4.290.0030.04012.46
5.4.280.0090.03112.36
5.4.270.0070.03412.35
5.4.260.0120.03012.36
5.4.250.0090.03412.36
5.4.240.0040.03812.36
5.4.230.0050.03912.35
5.4.220.0060.03712.35
5.4.210.0060.03612.35
5.4.200.0080.03512.34
5.4.190.0020.03912.34
5.4.180.0070.03412.34
5.4.170.0070.03612.35
5.4.160.0040.03912.35
5.4.150.0040.03812.35
5.4.140.0120.03212.03
5.4.130.0050.03812.02
5.4.120.0090.03711.97
5.4.110.0060.03811.97
5.4.100.0060.03611.97
5.4.90.0080.03511.97
5.4.80.0040.03911.97
5.4.70.0050.03611.96
5.4.60.0040.03711.97
5.4.50.0050.04311.97
5.4.40.0080.03311.96
5.4.30.0050.03711.95
5.4.20.0090.03311.95
5.4.10.0060.03511.96
5.4.00.0050.03811.45
5.3.290.0050.04012.80
5.3.280.0040.04112.71
5.3.270.0070.04112.72
5.3.260.0060.04112.72
5.3.250.0080.03512.72
5.3.240.0080.03612.72
5.3.230.0070.03712.71
5.3.220.0110.03212.68
5.3.210.0040.04212.68
5.3.200.0050.03912.68
5.3.190.0070.03612.68
5.3.180.0060.03712.67
5.3.170.0120.03212.67
5.3.160.0030.03912.67
5.3.150.0130.03012.67
5.3.140.0070.04412.66
5.3.130.0060.03912.65
5.3.120.0060.04012.66
5.3.110.0090.03612.66
5.3.100.0040.03812.12
5.3.90.0060.03712.08
5.3.80.0090.03412.08
5.3.70.0080.04712.08
5.3.60.0080.04312.06
5.3.50.0090.03412.00
5.3.40.0100.03412.00
5.3.30.0070.03411.95
5.3.20.0090.04111.73
5.3.10.0070.03611.70
5.3.00.0050.03811.68
5.2.170.0090.0299.19
5.2.160.0040.0319.19
5.2.150.0050.0319.19
5.2.140.0080.0299.18
5.2.130.0070.0299.15
5.2.120.0040.0319.14
5.2.110.0050.0329.15
5.2.100.0060.0289.15
5.2.90.0070.0289.15
5.2.80.0070.0279.14
5.2.70.0040.0429.14
5.2.60.0100.0379.10
5.2.50.0060.0439.06
5.2.40.0080.0389.04
5.2.30.0080.0409.01
5.2.20.0050.0389.01
5.2.10.0060.0278.96
5.2.00.0020.0318.82
5.1.60.0040.0248.11
5.1.50.0060.0238.10
5.1.40.0050.0248.08
5.1.30.0050.0268.43
5.1.20.0050.0258.45
5.1.10.0050.0258.18
5.1.00.0040.0278.18
5.0.50.0060.0186.67
5.0.40.0030.0206.52
5.0.30.0050.0306.34
5.0.20.0030.0196.30
5.0.10.0010.0226.29
5.0.00.0040.0296.27
4.4.90.0040.0144.78
4.4.80.0060.0124.75
4.4.70.0020.0164.75
4.4.60.0010.0184.76
4.4.50.0010.0184.77
4.4.40.0030.0254.71
4.4.30.0040.0144.75
4.4.20.0050.0134.84
4.4.10.0040.0154.85
4.4.00.0030.0244.76
4.3.110.0050.0204.67
4.3.100.0040.0174.66
4.3.90.0020.0164.63
4.3.80.0010.0284.58
4.3.70.0020.0164.63
4.3.60.0010.0174.63
4.3.50.0020.0174.63
4.3.40.0030.0244.54
4.3.30.0020.0163.34
4.3.20.0010.0173.31
4.3.10.0020.0163.27
4.3.00.0000.02030.85

preferences:
51.31 ms | 401 KiB | 5 Q