3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $times = ['Porto', 'Benfica', 'Maritimo', 'Sporting'] foreach($times as $m => $mandante) { foreach($times as $v => $visitante) { if ($times[$m] != $times[$v]) { $primeiro_turno[] = array($times[$m] => $times[$v]); $segundo_turno[] = array($times[$v] => $times[$m]); } } } print $primeiro_turno; print $segundo_turno;
Output for 5.4.0 - 5.4.22
Parse error: syntax error, unexpected 'foreach' (T_FOREACH) in /in/jesPG on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected '[' in /in/jesPG on line 3
Process exited with code 255.