3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* for each month i 6monthAvg = round( ( ( $profits[$i] +((isset($profits[$i-1])) ? $profits[$i-1] : 0) +((isset($profits[$i-2])) ? $profits[$i-2] : 0) +((isset($profits[$i-3])) ? $profits[$i-3] : 0) +((isset($profits[$i-4])) ? $profits[$i-4] : 0) +((isset($profits[$i-5])) ? $profits[$i-5] : 0))/6),2); for($i = 5, $length = count($months); $i < $length; $i++) { echo round(array_sum(array_slice($months, $i, -6), 2); } foreach(array_chunk($months, 6) as $sixMonths){ if(count($sixMonths) == 6) echo round(array_sum($sixMonths), 2); else echo "Not 6 months avilable"; } */ print_r(array_slice([1,2,3,4,5,6], 5, -6));
Output for git.master, git.master_jit, rfc.property-hooks
Array ( )

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:
88.84 ms | 401 KiB | 8 Q