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].", "; } ?> - See more at: http://www.w3resource.com/php-exercises/php-array-exercises.php#sthash.NguYCy1F.dpuf

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.00416.63
8.3.50.0110.00721.97
8.3.40.0150.00018.70
8.3.30.0030.01019.19
8.3.20.0000.00720.34
8.3.10.0080.00023.36
8.3.00.0040.00419.38
8.2.180.0120.00618.42
8.2.170.0120.00622.96
8.2.160.0100.00320.47
8.2.150.0070.00024.18
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0070.00022.27
8.2.110.0050.00519.27
8.2.100.0110.00017.91
8.2.90.0040.00419.21
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0060.00317.93
8.2.50.0000.00818.10
8.2.40.0100.00019.77
8.2.30.0000.00820.02
8.2.20.0030.00517.70
8.2.10.0040.00418.14
8.2.00.0000.00717.76
8.1.280.0160.00325.92
8.1.270.0030.00523.92
8.1.260.0000.00926.35
8.1.250.0000.00728.09
8.1.240.0030.00620.69
8.1.230.0120.00317.77
8.1.220.0050.00317.76
8.1.210.0060.00318.77
8.1.200.0100.00017.23
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0040.00418.61
8.1.160.0040.00422.11
8.1.150.0030.00618.66
8.1.140.0040.00417.49
8.1.130.0040.00417.79
8.1.120.0040.00417.49
8.1.110.0040.00417.50
8.1.100.0050.00317.49
8.1.90.0070.00017.39
8.1.80.0000.00717.50
8.1.70.0070.00017.46
8.1.60.0060.00317.61
8.1.50.0040.00417.44
8.1.40.0030.00617.54
8.1.30.0030.00617.69
8.1.20.0050.00317.66
8.1.10.0000.00717.63
8.1.00.0000.00717.50
8.0.300.0040.00420.02
8.0.290.0040.00416.58
8.0.280.0000.00718.48
8.0.270.0030.00517.16
8.0.260.0040.00417.30
8.0.250.0000.00617.02
8.0.240.0000.00816.98
8.0.230.0040.00417.08
8.0.220.0070.00016.95
8.0.210.0030.00316.85
8.0.200.0050.00216.88
8.0.190.0030.00517.01
8.0.180.0050.00316.95
8.0.170.0000.00816.81
8.0.160.0040.00416.78
8.0.150.0050.00216.90
8.0.140.0070.00016.82
8.0.130.0030.00313.39
8.0.120.0000.00816.88
8.0.110.0070.00316.79
8.0.100.0080.00016.81
8.0.90.0040.00416.88
8.0.80.0070.00716.95
8.0.70.0050.00316.83
8.0.60.0000.00716.99
8.0.50.0070.00016.98
8.0.30.0070.01117.15
8.0.20.0120.00717.40
8.0.10.0040.00416.96
8.0.00.0100.00716.74
7.4.330.0000.00515.00
7.4.320.0030.00316.55
7.4.300.0000.00616.54
7.4.290.0070.00016.54
7.4.280.0040.00416.46
7.4.270.0070.00016.57
7.4.260.0030.00316.50
7.4.250.0080.00016.64
7.4.240.0030.00316.54
7.4.230.0000.00816.73
7.4.220.0070.01116.60
7.4.210.0060.00916.65
7.4.200.0000.00716.64
7.4.190.0030.00516.58
7.4.160.0030.01216.48
7.4.150.0120.00617.40
7.4.140.0160.00517.86
7.4.130.0060.01116.52
7.4.120.0080.00916.54
7.4.110.0060.01116.61
7.4.100.0120.00616.78
7.4.90.0040.01216.59
7.4.80.0130.01319.39
7.4.70.0150.00716.36
7.4.60.0060.01016.51
7.4.50.0090.00016.72
7.4.40.0100.00816.64
7.4.30.0040.01116.54
7.4.10.0050.01416.56
7.4.00.0090.00715.83
7.3.330.0000.00813.26
7.3.320.0030.00313.08
7.3.310.0040.00416.21
7.3.300.0000.00716.35
7.3.290.0060.01216.38
7.3.280.0110.00816.37
7.3.270.0110.00917.40
7.3.260.0170.00016.65
7.3.250.0120.00916.26
7.3.240.0080.00816.34
7.3.230.0140.00316.57
7.3.210.0100.00616.29
7.3.200.0100.01319.39
7.3.190.0070.01116.49
7.3.180.0060.00916.53
7.3.170.0070.01116.42
7.3.160.0100.01016.61
7.3.130.0110.00816.25
7.3.120.0110.00715.63
7.3.110.0040.01516.46
7.3.100.0070.01016.46
7.3.90.0120.00016.53
7.3.80.0060.00616.21
7.3.70.0060.00616.50
7.3.60.0160.00016.45
7.3.50.0070.00416.38
7.3.40.0070.00716.34
7.3.30.0050.00916.29
7.3.20.0090.00918.24
7.3.10.0060.00618.15
7.3.00.0070.00318.04
7.2.330.0170.00616.59
7.2.320.0030.01716.32
7.2.310.0100.00716.39
7.2.300.0130.01016.49
7.2.290.0030.01316.80
7.2.260.0070.01316.53
7.2.250.0040.01816.75
7.2.240.0060.01316.43
7.2.230.0120.00616.68
7.2.220.0000.01116.68
7.2.210.0030.00616.42
7.2.200.0070.00716.61
7.2.190.0030.01016.64
7.2.180.0030.01416.52
7.2.170.0100.00016.63
7.2.160.0080.00516.64
7.2.150.0000.02218.35
7.2.140.0080.00318.55
7.2.130.0000.01418.52
7.2.120.0040.00718.44
7.2.110.0120.00018.35
7.2.100.0060.01018.31
7.2.90.0060.00618.32
7.2.80.0030.00818.25
7.2.70.0030.00818.38
7.2.60.0080.00818.63
7.2.50.0090.00418.59
7.2.40.0030.00618.60
7.2.30.0030.01018.45
7.2.20.0040.00918.48
7.2.10.0110.00318.27
7.2.00.0080.00518.96
7.1.330.0150.00417.53
7.1.320.0060.00917.56
7.1.310.0030.00717.20
7.1.300.0030.01017.40
7.1.290.0070.00717.33
7.1.280.0060.00617.17
7.1.270.0050.00717.24
7.1.260.0080.00417.43
7.1.250.0090.00617.30
7.1.240.0030.00917.25
7.1.230.0030.01017.39
7.1.220.0070.00717.37
7.1.210.0030.01017.27
7.1.200.0040.00817.29
7.1.190.0030.01317.37
7.1.180.0050.00517.29
7.1.170.0000.01217.29
7.1.160.0040.01117.46
7.1.150.0080.00517.43
7.1.140.0040.00917.37
7.1.130.0080.00417.35
7.1.120.0040.00717.49
7.1.110.0060.00317.39
7.1.100.0110.00617.69
7.1.90.0070.00717.50
7.1.80.0000.01217.39
7.1.70.0030.00617.35
7.1.60.0050.01118.36
7.1.50.0050.01517.10
7.1.40.0100.00317.41
7.1.30.0090.00617.27
7.1.20.0070.00717.34
7.1.10.0030.00817.31
7.1.00.0090.03519.76
7.0.330.0070.00716.96
7.0.320.0040.01116.88
7.0.310.0100.00316.93
7.0.300.0000.01417.13
7.0.290.0040.00816.95
7.0.280.0030.00817.04
7.0.270.0070.00717.07
7.0.260.0040.00817.08
7.0.250.0000.01417.25
7.0.240.0030.01017.23
7.0.230.0000.01217.08
7.0.220.0030.01017.06
7.0.210.0080.00417.16
7.0.200.0030.01016.85
7.0.190.0000.01517.07
7.0.180.0000.01217.01
7.0.170.0030.00617.08
7.0.160.0070.00717.17
7.0.150.0100.00617.03
7.0.140.0080.03819.41
7.0.130.0030.01017.10
7.0.120.0070.00717.14
7.0.110.0030.00916.98
7.0.100.0030.01016.91
7.0.90.0060.00616.98
7.0.80.0080.00716.96
7.0.70.0110.00017.09
7.0.60.0100.02218.56
7.0.50.0080.04117.38
7.0.40.0070.04517.54
7.0.30.0260.02717.55
7.0.20.0200.03517.52
7.0.10.0050.02617.52
7.0.00.0050.03217.53
5.6.400.0070.01016.00
5.6.390.0030.00615.66
5.6.380.0110.00416.06
5.6.370.0120.00316.12
5.6.360.0110.00416.02
5.6.350.0100.00316.11
5.6.340.0090.00415.79
5.6.330.0040.00416.05
5.6.320.0040.01115.88
5.6.310.0030.01016.01
5.6.300.0110.00716.06
5.6.290.0070.01115.93
5.6.280.0080.03718.66
5.6.270.0030.01315.94
5.6.260.0080.00315.87
5.6.250.0040.00816.00
5.6.240.0000.01215.89
5.6.230.0030.00616.08
5.6.220.0060.00615.80
5.6.210.0030.02518.44
5.6.200.0070.03117.11
5.6.190.0100.04218.17
5.6.180.0170.03118.13
5.6.170.0070.03118.30
5.6.160.0100.04518.28
5.6.150.0070.03517.06
5.6.140.0090.03917.04
5.6.130.0050.02717.17
5.6.120.0100.04418.41
5.6.110.0030.02818.41
5.6.100.0050.04418.43
5.6.90.0110.03818.41
5.6.80.0090.03918.01
5.6.70.0060.00915.89
5.6.60.0030.00715.81
5.6.50.0030.01015.85
5.6.40.0070.00415.69
5.6.30.0100.00715.87
5.6.20.0080.00815.89
5.6.10.0060.00615.80
5.6.00.0100.00315.85
5.5.380.0100.00315.78
5.5.370.0000.01215.78
5.5.360.0000.01315.89
5.5.350.0120.04718.10
5.5.340.0050.03416.93
5.5.330.0080.03318.00
5.5.320.0220.03917.99
5.5.310.0130.04318.09
5.5.300.0060.04417.00
5.5.290.0070.04516.93
5.5.280.0050.03318.31
5.5.270.0040.02518.42
5.5.260.0120.04218.35
5.5.250.0120.03818.27
5.5.240.0090.03218.06
5.5.230.0100.00315.80
5.5.220.0070.00415.79
5.5.210.0120.00315.74
5.5.200.0070.01015.97
5.5.190.0120.00615.95
5.5.180.0040.01415.88
5.5.170.0080.00815.67
5.5.160.0110.00715.91
5.5.150.0090.00615.89
5.5.140.0070.01015.98
5.5.130.0110.00415.94
5.5.120.0110.00715.83
5.5.110.0070.01015.91
5.5.100.0040.00815.82
5.5.90.0060.01015.69
5.5.80.0040.00915.73
5.5.70.0030.01015.44
5.5.60.0090.00315.79
5.5.50.0110.00715.96
5.5.40.0030.01315.71
5.5.30.0110.00715.81
5.5.20.0000.01315.42
5.5.10.0070.01015.49
5.5.00.0040.01215.53
5.4.450.0200.03016.10
5.4.440.0450.02315.93
5.4.430.0080.02015.94
5.4.420.0320.02615.89
5.4.410.0360.01815.86
5.4.400.0150.01815.68
5.4.390.0400.02515.72
5.4.380.0220.02915.47
5.4.370.0230.02315.75
5.4.360.0200.03815.60
5.4.350.0190.03515.71
5.4.340.0250.03315.59
5.4.330.0030.00612.45
5.4.320.0050.02312.48
5.4.310.0040.02412.46
5.4.300.0050.02212.55
5.4.290.0080.03412.39
5.4.280.0100.02912.34
5.4.270.0120.05012.45
5.4.260.0080.03112.40
5.4.250.0120.03612.41
5.4.240.0050.03312.47
5.4.230.0110.03712.37
5.4.220.0070.02312.47
5.4.210.0080.02212.41
5.4.200.0060.02312.46
5.4.190.0060.02312.34
5.4.180.0060.02112.40
5.4.170.0040.02712.50
5.4.160.0050.02112.51
5.4.150.0070.02512.48
5.4.140.0070.03112.29
5.4.130.0050.02512.24
5.4.120.0050.02312.23
5.4.110.0080.02112.25
5.4.100.0040.02412.33
5.4.90.0050.02412.18
5.4.80.0050.02412.24
5.4.70.0080.01912.29
5.4.60.0090.01812.19
5.4.50.0030.02412.39
5.4.40.0040.02212.15
5.4.30.0050.02312.24
5.4.20.0020.02712.26
5.4.10.0030.02412.27
5.4.00.0050.02411.98
5.3.290.0050.02312.91
5.3.280.0050.02512.74
5.3.270.0030.02812.84
5.3.260.0050.02912.96
5.3.250.0070.03312.88
5.3.240.0080.03612.78
5.3.230.0090.03412.92
5.3.220.0070.03412.75
5.3.210.0120.02612.76
5.3.200.0120.02312.80
5.3.190.0140.02012.76
5.3.180.0080.02112.79
5.3.170.0050.02712.86
5.3.160.0080.02412.89
5.3.150.0060.02412.94
5.3.140.0080.02012.82
5.3.130.0080.02912.95
5.3.120.0060.02612.81
5.3.110.0080.02312.77
5.3.100.0050.02412.67
5.3.90.0040.02712.55
5.3.80.0040.02512.46
5.3.70.0050.02312.46
5.3.60.0090.01612.46
5.3.50.0090.02712.50
5.3.40.0030.02512.51
5.3.30.0040.02312.54
5.3.20.0040.02112.32
5.3.10.0030.02312.22
5.3.00.0040.02512.12
5.2.170.0050.0469.19
5.2.160.0050.0349.19
5.2.150.0030.0359.19
5.2.140.0050.0349.19
5.2.130.0060.0289.15
5.2.120.0090.0259.14
5.2.110.0050.0299.16
5.2.100.0040.0299.14
5.2.90.0060.0299.14
5.2.80.0060.0349.14
5.2.70.0060.0299.14
5.2.60.0040.0319.09
5.2.50.0060.0289.07
5.2.40.0020.0329.04
5.2.30.0030.0339.01
5.2.20.0050.0329.01
5.2.10.0030.0298.96
5.2.00.0070.0278.82
5.1.60.0030.0258.11
5.1.50.0030.0268.11
5.1.40.0060.0238.08
5.1.30.0010.0378.43
5.1.20.0090.0308.46
5.1.10.0090.0318.18
5.1.00.0030.0328.18
5.0.50.0020.0226.67
5.0.40.0040.0266.53
5.0.30.0040.0316.34
5.0.20.0040.0276.30
5.0.10.0060.0316.28
5.0.00.0070.0426.27
4.4.90.0040.0194.77
4.4.80.0040.0154.75
4.4.70.0020.0164.75
4.4.60.0030.0214.76
4.4.50.0060.0194.77
4.4.40.0040.0364.71
4.4.30.0050.0264.76
4.4.20.0050.0144.84
4.4.10.0040.0224.85
4.4.00.0020.0364.76
4.3.110.0030.0234.67
4.3.100.0060.0194.67
4.3.90.0030.0204.63
4.3.80.0060.0244.59
4.3.70.0050.0174.63
4.3.60.0040.0134.63
4.3.50.0070.0214.63
4.3.40.0050.0324.54
4.3.30.0030.0223.33
4.3.20.0030.0173.31
4.3.10.0030.0203.26
4.3.00.0170.01316.03

preferences:
47.46 ms | 401 KiB | 5 Q