3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(array("hola" => 1)); $b = array(array("como" => 2)); $f = array(37); $c = array_merge($a, $b, $f); $d = array_unique($c); var_dump($d);
based on P9Yio
Output for 7.0.0 - 7.1.0
Notice: Array to string conversion in /in/66Vit on line 8 Notice: Array to string conversion in /in/66Vit on line 8 Notice: Array to string conversion in /in/66Vit on line 8 Notice: Array to string conversion in /in/66Vit on line 8 Notice: Array to string conversion in /in/66Vit on line 8 Notice: Array to string conversion in /in/66Vit on line 8 Notice: Array to string conversion in /in/66Vit on line 8 array(2) { [0]=> array(1) { ["hola"]=> int(1) } [2]=> int(37) }
Output for hhvm-3.10.0 - 3.12.0
Notice: Array to string conversion in /in/66Vit on line 8 Notice: Array to string conversion in /in/66Vit on line 8 array(2) { [0]=> array(1) { ["hola"]=> int(1) } [2]=> int(37) }
Output for 5.4.0 - 5.6.28
Notice: Array to string conversion in /in/66Vit on line 8 Notice: Array to string conversion in /in/66Vit on line 8 Notice: Array to string conversion in /in/66Vit on line 8 Notice: Array to string conversion in /in/66Vit on line 8 Notice: Array to string conversion in /in/66Vit on line 8 Notice: Array to string conversion in /in/66Vit on line 8 array(2) { [0]=> array(1) { ["hola"]=> int(1) } [2]=> int(37) }
Output for 4.3.0 - 5.2.8, 5.2.10 - 5.3.29
array(2) { [0]=> array(1) { ["hola"]=> int(1) } [2]=> int(37) }
Output for 5.2.9
array(3) { [0]=> array(1) { ["hola"]=> int(1) } [1]=> array(1) { ["como"]=> int(2) } [2]=> int(37) }