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);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Array to string conversion in /in/4KYvH on line 13 Warning: Array to string conversion in /in/4KYvH on line 13 Warning: Array to string conversion in /in/4KYvH on line 13 Warning: Array to string conversion in /in/4KYvH on line 13 Warning: Array to string conversion in /in/4KYvH on line 13 Warning: Array to string conversion in /in/4KYvH on line 13 Array ( [0] => Array ( [0] => 1150 [1] => 10 [2] => 0 ) )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
33.58 ms | 402 KiB | 8 Q