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].", "; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Average Temperature is : 70.6<br><br> List of seven lowest temperatures : 60, 62, 63, 63, 64, <br>List of seven highest temperatures : 76, 78, 79, 81, 85,

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
36.76 ms | 401 KiB | 8 Q