3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr=array(1100,3150,4430,4430,5170,7450,7450,7450,8230); $out = array($arr[0]); for ($i = 1; $i < count($arr); $i++) { $out[$i] = $out[$i-1] + $arr[$i]; } $arr = array_combine($out, $arr); print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [1100] => 1100 [4250] => 3150 [8680] => 4430 [13110] => 4430 [18280] => 5170 [25730] => 7450 [33180] => 7450 [40630] => 7450 [48860] => 8230 )

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:
96.88 ms | 405 KiB | 5 Q