3v4l.org

run code in 300+ PHP versions simultaneously
<?php $temp = '{"1150": [1150, 10, 0], "1168": [1168, 100, 0], "1169": [1169, 100, 1], "1175": [1175, 90, 0], "1178": [1178, 200, 0]}'; $temp2 = '{"1150": [1150, 10, 0]}'; $temp = json_decode($temp, true); $temp2 = json_decode($temp2, true); $temp3 = array_merge($temp, $temp2); print_r(array_unique($temp3)); // $array = array_unique(array_merge($temp, $temp2)); // print_r($array);

preferences:
48.52 ms | 402 KiB | 5 Q