3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array('foo','bar','key'=> array('zot1','zot2','zot3')); foreach($array as $key) { var_dump($key); } foreach($array[0] as $key) {var_dump($key)}; foreach($array['key'] as $key) {var_dump($key)}; //foreach($array as $key=>$val) {var_dump($key)};
Output for 5.3.0 - 5.4.24
Parse error: syntax error, unexpected '}' in /in/8jEuF on line 8
Process exited with code 255.