3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 5.4.2 - 7.2.0
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/AodLP on line 3
Process exited with code 255.