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, SORT_REGULAR));
Output for 5.2.9 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
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" } }
Output for 4.3.0 - 5.2.8
Warning: Wrong parameter count for array_unique() in /in/DSioB on line 8 NULL