3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(array(1),2,3); $b = array(1,2,3); $f = array(2,3,4); $c = array_merge($a, $b, $f); var_dump($c); $d = array_unique($c); var_dump($d);
based on uO6kH
Output for 7.0.0 - 7.1.0
array(9) { [0]=> array(1) { [0]=> int(1) } [1]=> int(2) [2]=> int(3) [3]=> int(1) [4]=> int(2) [5]=> int(3) [6]=> int(2) [7]=> int(3) [8]=> int(4) } Notice: Array to string conversion in /in/W3tXq on line 9 Notice: Array to string conversion in /in/W3tXq on line 9 Notice: Array to string conversion in /in/W3tXq on line 9 Notice: Array to string conversion in /in/W3tXq on line 9 Notice: Array to string conversion in /in/W3tXq on line 9 Notice: Array to string conversion in /in/W3tXq on line 9 Notice: Array to string conversion in /in/W3tXq on line 9 Notice: Array to string conversion in /in/W3tXq on line 9 Notice: Array to string conversion in /in/W3tXq on line 9 array(5) { [0]=> array(1) { [0]=> int(1) } [1]=> int(2) [2]=> int(3) [3]=> int(1) [8]=> int(4) }
Output for 5.4.0 - 5.6.28
array(9) { [0]=> array(1) { [0]=> int(1) } [1]=> int(2) [2]=> int(3) [3]=> int(1) [4]=> int(2) [5]=> int(3) [6]=> int(2) [7]=> int(3) [8]=> int(4) } Notice: Array to string conversion in /in/W3tXq on line 9 Notice: Array to string conversion in /in/W3tXq on line 9 Notice: Array to string conversion in /in/W3tXq on line 9 Notice: Array to string conversion in /in/W3tXq on line 9 Notice: Array to string conversion in /in/W3tXq on line 9 array(5) { [0]=> array(1) { [0]=> int(1) } [1]=> int(2) [2]=> int(3) [3]=> int(1) [8]=> int(4) }
Output for 4.3.0 - 5.3.29
array(9) { [0]=> array(1) { [0]=> int(1) } [1]=> int(2) [2]=> int(3) [3]=> int(1) [4]=> int(2) [5]=> int(3) [6]=> int(2) [7]=> int(3) [8]=> int(4) } array(5) { [0]=> array(1) { [0]=> int(1) } [1]=> int(2) [2]=> int(3) [3]=> int(1) [8]=> int(4) }