3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array( [0] => array( "id" => "1", "name" => "Merkury" ), [1] => array( "id" => "1", "name" => "hippy sauce" ) ); foreach($array as $a){ foreach ($a as $k){ print($k['id'].PHP_EOL); print($k['name'].PHP_EOL); } } ?>
Output for 7.0.0 - 7.0.2
Fatal error: Illegal offset type in /in/cTU7i on line 6
Process exited with code 255.
Output for 5.4.12 - 5.6.28
Warning: Illegal offset type in /in/cTU7i on line 6 Warning: Illegal offset type in /in/cTU7i on line 11
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/cTU7i on line 3
Process exited with code 255.