3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [1, 2]; $a += [3, 4]; var_dump($a); $a = array_merge($a, [3, 4]); var_dump($a);
based on Xb1lA
Output for 5.6.0 - 5.6.30, hhvm-3.18.4 - 3.21.0, 7.0.0 - 7.3.1
array(2) { [0]=> int(1) [1]=> int(2) } array(4) { [0]=> int(1) [1]=> int(2) [2]=> int(3) [3]=> int(4) }