3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $conf = array(); $test = array( 'one' => array( 'conf1' => '1' ), 'two' => array( 'conf2' => '2' ), 'three' => array( 'conf3' => '3' ), ); foreach ($test as $item) { var_dump($item); $config = array_merge($conf); } echo 'result'; var_dump($conf);
based on b6RuV
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" } resultarray(0) { }