3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array['messi']['google'] = 2; $array['messi']['yahoo'] = 2; $array['ronaldo']['google'] = 1; $array['ronaldo']['yahoo'] = 1; foreach($array as $person => $searchEngineCounts) { echo $person."<br/>" foreach($searchEngineCounts as $engine => $count) { echo $engine . ": " . $count . "<br/>"; } echo "<br/>"; }
Output for 5.4.0 - 5.4.27
Parse error: syntax error, unexpected 'foreach' (T_FOREACH), expecting ',' or ';' in /in/Lbouh on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_FOREACH, expecting ',' or ';' in /in/Lbouh on line 12
Process exited with code 255.