3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tests = array( 'test1' => array( '11' => '11', '22' => '22', '33' => '33', '44' => '44' ), 'test2' => array( '44' => '44', '55' => '55', '66' => '66', '77' => '77' )); $new = array(); foreach( $tests as $id => $test ) { $new += $test; } print_r($new);
Output for 4.3.0 - 5.6.23, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [11] => 11 [22] => 22 [33] => 33 [44] => 44 [55] => 55 [66] => 66 [77] => 77 )