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);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4KYvH
function name:  (null)
number of ops:  24
compiled vars:  !0 = $temp, !1 = $temp2, !2 = $temp3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%7B%221150%22%3A+%5B1150%2C+10%2C+0%5D%2C+%221168%22%3A+%5B1168%2C+100%2C+0%5D%2C+%221169%22%3A+%5B1169%2C+100%2C+1%5D%2C+%221175%22%3A+%5B1175%2C+90%2C+0%5D%2C+%221178%22%3A+%5B1178%2C+200%2C+0%5D%7D'
    6     1        ASSIGN                                                   !1, '%7B%221150%22%3A+%5B1150%2C+10%2C+0%5D%7D'
    8     2        INIT_FCALL                                               'json_decode'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !0, $5
    9     7        INIT_FCALL                                               'json_decode'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 <true>
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !1, $7
   11    12        INIT_FCALL                                               'array_merge'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !2, $9
   13    17        INIT_FCALL                                               'print_r'
         18        INIT_FCALL                                               'array_unique'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $11     
         21        SEND_VAR                                                 $11
         22        DO_ICALL                                                 
   18    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.61 ms | 1395 KiB | 21 Q