3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr1 = array(array('path'=>'cola/loca/archivo'),array('path'=> 'otra cosa/mariposa')); $arr2 = array(array('path'=>'cola/loca/archivo'),array('path'=>'cola/loca')); $arr_result = array_unique(array_merge($arr1 , $arr2)); print_r($arr_result);
based on 2IF9c
Output for 7.2.0
Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Array ( [0] => Array ( [path] => cola/loca/archivo ) )
Output for 7.0.0 - 7.1.10
Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Array ( [0] => Array ( [path] => cola/loca/archivo ) )
Output for 5.4.11 - 5.6.21
Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Notice: Array to string conversion in /in/BdAs2 on line 6 Array ( [0] => Array ( [path] => cola/loca/archivo ) )
Output for 5.3.21 - 5.3.29
Array ( [0] => Array ( [path] => cola/loca/archivo ) )