3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a1 = array(0=>"fqcn", 2 => "a"); $a2 = array(0=>new stdClass(),1=>"a",2=>"b"); print_r(array_merge($a1,$a2)); print_r($a1+$a2); print_r($a2+$a1);
based on h55sZ
Output for 5.6.0 - 5.6.38, hhvm-3.15.4 - 3.22.0, 7.0.0 - 7.3.0rc4
Array ( [0] => fqcn [1] => a [2] => stdClass Object ( ) [3] => a [4] => b ) Array ( [0] => fqcn [2] => a [1] => a ) Array ( [0] => stdClass Object ( ) [1] => a [2] => b )