3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //Enter your code here, enjoy! $array = array(); $array[] = array("foo" => 111, "bar" => 444); $array[] = array("foo" => 222, "bar" => 555); $array[] = array("foo" => 333, "bar" => 777); $array2 = array(); $array2[] = array('foobar' => 888, 'barfoo'=>999); $array2[] = array('barfoo' => 999, 'barfoo'=>1010); foreach( $array as $key=>$value){ echo $key."\t=>\t".$value['foo']."...".$value['asdf']."\n"; } //$array[0] = array_merge[$array, $array2]; //echo var_dump($array);
Output for 5.3.7 - 7.1.0
Notice: Undefined index: asdf in /in/9Qsad on line 16 0 => 111... Notice: Undefined index: asdf in /in/9Qsad on line 16 1 => 222... Notice: Undefined index: asdf in /in/9Qsad on line 16 2 => 333...