3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(array('fname' => 'hak', 'lname' => 're'), array('fname' => 'iro', 'lname' => 'egbu')); $b = array(array('fname' => 'nik', 'lname' => 'iC'), array('fname' => 'hak', 'lname' => 're')); $c = array_merge($a, $b); var_dump(array_unique($c));
Output for 7.0.0 - 7.1.0
Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 array(1) { [0]=> array(2) { ["fname"]=> string(3) "hak" ["lname"]=> string(2) "re" } }
Output for 5.4.0 - 5.6.28
Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 Notice: Array to string conversion in /in/Wrkvu on line 8 array(1) { [0]=> array(2) { ["fname"]=> string(3) "hak" ["lname"]=> string(2) "re" } }
Output for 4.3.0 - 5.2.8, 5.2.10 - 5.3.29
array(1) { [0]=> array(2) { ["fname"]=> string(3) "hak" ["lname"]=> string(2) "re" } }
Output for 5.2.9
array(3) { [0]=> array(2) { ["fname"]=> string(3) "hak" ["lname"]=> string(2) "re" } [1]=> array(2) { ["fname"]=> string(3) "iro" ["lname"]=> string(4) "egbu" } [2]=> array(2) { ["fname"]=> string(3) "nik" ["lname"]=> string(2) "iC" } }