3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $results = array( array( array('foo1'), array('foo2'), ), array( array('bar1'), array('bar2'), ), ); $rows = call_user_func_array('array_merge', $results); print_r($rows); echo var_export(array_merge($results[0], $results[1]), true);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => Array ( [0] => foo1 ) [1] => Array ( [0] => foo2 ) [2] => Array ( [0] => bar1 ) [3] => Array ( [0] => bar2 ) ) array ( 0 => array ( 0 => 'foo1', ), 1 => array ( 0 => 'foo2', ), 2 => array ( 0 => 'bar1', ), 3 => array ( 0 => 'bar2', ), )