3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?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)
5.4.300.1170.05719.23
5.4.290.2230.03719.13
5.4.280.2200.04719.15
5.4.270.2130.04319.09
5.4.260.2200.04319.22
5.4.250.2400.03719.14
5.4.240.2200.04318.86
5.4.230.2130.04018.86
5.4.220.1870.04018.83
5.4.210.2270.04018.86
5.4.200.2170.04019.22
5.4.190.2170.04719.17
5.4.180.2030.03019.03
5.4.170.2170.04319.03
5.4.160.2270.03718.85
5.4.150.2270.04019.20
5.4.140.2170.04016.50
5.4.130.1870.04016.73
5.4.120.2130.04016.37
5.4.110.2270.04016.25
5.4.100.2200.03716.25
5.4.90.2170.02716.32
5.4.80.1970.03016.57
5.4.70.2270.03316.55
5.4.60.2330.03316.53
5.4.50.2330.03316.56
5.4.40.2130.02716.33
5.4.30.2130.03716.16
5.4.20.2230.03716.53
5.4.10.2130.02716.42
5.4.00.2000.03315.78
5.3.280.2170.04014.64
5.3.270.2100.04014.54
5.3.260.2070.04014.48
5.3.250.2000.03314.59
5.3.240.2370.04314.45
5.3.230.1730.03714.44
5.3.220.2130.04314.49
5.3.210.2270.03714.43
5.3.200.2000.03714.56
5.3.190.2030.03314.52
5.3.180.2030.04014.42
5.3.170.2200.04314.58
5.3.160.1970.04014.41
5.3.150.2170.04014.66
5.3.140.2330.04014.57
5.3.130.2130.04714.50
5.3.120.2830.02714.38
5.3.110.2130.04314.49
5.3.100.2130.04314.02
5.3.90.2130.04013.93
5.3.80.2200.04013.87
5.3.70.2030.03313.87
5.3.60.2070.03713.95
5.3.50.2170.04313.88
5.3.40.2270.03713.96
5.3.30.2230.04014.00
5.3.20.2130.04313.79
5.3.10.2100.03713.55
5.3.00.2000.03013.45

preferences:
138.84 ms | 1394 KiB | 7 Q