3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $conf = array(); $test = array( array( 'conf1' => '1' ), array( 'conf2' => '2' ), array( 'conf3' => '3' ), ); foreach ($test as $item) { var_dump($item); $config = array_merge($conf); } var_dump($conf);
based on O3qNF
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(1) { ["conf1"]=> string(1) "1" } array(1) { ["conf2"]=> string(1) "2" } array(1) { ["conf3"]=> string(1) "3" } array(0) { }