3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tests = array( 'test1' => array( '11', '22', '33', '44' ), 'test2' => array( '44', '55', '66', '77' ) ); $new = array(); $new2 = array(); foreach( $tests as $test ) { $new += $test; $new2 = array_merge( $new2, $test ); } print_r($new); print_r($new2);
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Array ( [0] => 11 [1] => 22 [2] => 33 [3] => 44 ) Array ( [0] => 11 [1] => 22 [2] => 33 [3] => 44 [4] => 44 [5] => 55 [6] => 66 [7] => 77 )
Output for hhvm-3.10.0

Process exited with code 153.