3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array( 'key' => 'value', 'foo' => 'bar', ); var_dump(array_merge_recursive($array, $array));
Output for 4.3.3 - 5.6.23, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(2) { ["key"]=> array(2) { [0]=> string(5) "value" [1]=> string(5) "value" } ["foo"]=> array(2) { [0]=> string(3) "bar" [1]=> string(3) "bar" } }
Output for 4.3.0 - 4.3.2
Warning: array_merge_recursive(): recursion detected in /in/96Oui on line 8 array(2) { ["key"]=> string(5) "value" ["foo"]=> string(3) "bar" }