3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arg1 = ["name"=>"Test org","tagline"=>"whatever dude","urls"=>"http://www.whatever.com"]; $arg2 = ["name"=>"Test org2","tagline2"=>"whatever dude2","urls2"=>"http://www.whatever2.com"]; $args = array( 1 => $arg1, 2 => $arg2 ); foreach ($args as $arg => $value) { print_r($args[$key]); }
based on tFLig
Output for 5.4.0 - 7.2.0
Notice: Undefined variable: key in /in/kmmte on line 9 Notice: Undefined index: in /in/kmmte on line 9 Notice: Undefined variable: key in /in/kmmte on line 9 Notice: Undefined index: in /in/kmmte on line 9
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/kmmte on line 3
Process exited with code 255.