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 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
messi<br/>google: 2<br/>yahoo: 2<br/><br/>ronaldo<br/>google: 1<br/>yahoo: 1<br/><br/>