3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array('a' => array(0 => 1, 1 => 2) ,'b' => array(0 => 1, 1 => 2)); print_r(array_reduce($a, 'array_merge', $a));
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.2, 5.3.0 - 7.1.0
Array ( [a] => Array ( [0] => 1 [1] => 2 ) [b] => Array ( [0] => 1 [1] => 2 ) [0] => 1 [1] => 2 [2] => 1 [3] => 2 )
Output for 5.0.3 - 5.2.17
Warning: array_merge(): Argument #1 is not an array in /in/vDPKm on line 3 Warning: array_merge(): Argument #1 is not an array in /in/vDPKm on line 3
Output for 4.3.10 - 4.4.9
Array ( [0] => 1 [1] => 1 [2] => 2 [3] => 1 [4] => 2 )