3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $input = array(array('casa' => 'nova'), array('casa' => 'nova2'), array('casa' => 'nova'), array('casa' => 'nova3'), array('casa' => 'nova2')); // $input = array_map("unserialize", array_unique(array_map("serialize", $input))); $input = array_unique($input, SORT_REGULAR); var_dump($input);
based on RrGLs
Output for 5.2.9 - 7.2.0
array(3) { [0]=> array(1) { ["casa"]=> string(4) "nova" } [1]=> array(1) { ["casa"]=> string(5) "nova2" } [3]=> array(1) { ["casa"]=> string(5) "nova3" } }
Output for 4.3.0 - 5.2.8
Warning: Wrong parameter count for array_unique() in /in/NVWeF on line 4 NULL