3v4l.org

run code in 300+ PHP versions simultaneously
<?php $elems = [-1, 3, -4, 5, 1, -6, 2, 1]; function solution(array $A) { // write your code in PHP5.5 $equilibriums = array(); for($i = 0, $n = sizeof($arr);$i < $n;++$i) { if(array_sum(array_slice($arr, 0, $i)) == array_sum(array_slice($arr, $i + 1))) { $equilibriums[] = $i; } } return $equilibriums; }
Output for git.master, git.master_jit, rfc.property-hooks

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