3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { var $field = array(1); } $a = new A; $x = array("a" => $a); $y = array("a" => array("field" => array(2))); var_dump(array_merge_recursive($x,$y));
Output for 4.3.0 - 4.4.9, 5.1.3 - 7.1.0
array(1) { ["a"]=> array(1) { ["field"]=> array(2) { [0]=> int(1) [1]=> int(2) } } }
Output for 5.0.0 - 5.1.2
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/vmrnK on line 5 array(1) { ["a"]=> array(1) { ["field"]=> array(2) { [0]=> int(1) [1]=> int(2) } } }