3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json1 = '{"data": [{"category": "Games","id": "45345"}, {"category": "Music","id": "345345345"}, {"category": "Food","id": "1"}, {"category": "Pets","id": "13245345"}],"paging": {"next": "https://graph.facebook.com/1161990140/likes?limit=2&offset=2&__after_id=118243704898877"}}'; $json2 = '{"data": {"something": "blah","posts": [{"id": "34241","title": "orange"}],"items": [{"id": "1","name": "orange"},{"id": "2","name": "dog"},{"id": "3","name": "cat"},{"id": "4","name": "apple"}]}}'; $array1 = json_decode($json1, true); $array2 = json_decode($json2, true); $result = array_diff($array1, $array2); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hn7XZ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $json1, !1 = $json2, !2 = $array1, !3 = $array2, !4 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B%22data%22%3A+%5B%7B%22category%22%3A+%22Games%22%2C%22id%22%3A+%2245345%22%7D%2C+%7B%22category%22%3A+%22Music%22%2C%22id%22%3A+%22345345345%22%7D%2C+%7B%22category%22%3A+%22Food%22%2C%22id%22%3A+%221%22%7D%2C+%7B%22category%22%3A+%22Pets%22%2C%22id%22%3A+%2213245345%22%7D%5D%2C%22paging%22%3A+%7B%22next%22%3A+%22https%3A%2F%2Fgraph.facebook.com%2F1161990140%2Flikes%3Flimit%3D2%26offset%3D2%26__after_id%3D118243704898877%22%7D%7D'
    3     1        ASSIGN                                                   !1, '%7B%22data%22%3A++%7B%22something%22%3A+%22blah%22%2C%22posts%22%3A++%5B%7B%22id%22%3A+%2234241%22%2C%22title%22%3A+%22orange%22%7D%5D%2C%22items%22%3A++%5B%7B%22id%22%3A+%221%22%2C%22name%22%3A+%22orange%22%7D%2C%7B%22id%22%3A+%222%22%2C%22name%22%3A+%22dog%22%7D%2C%7B%22id%22%3A+%223%22%2C%22name%22%3A+%22cat%22%7D%2C%7B%22id%22%3A+%224%22%2C%22name%22%3A+%22apple%22%7D%5D%7D%7D'
    5     2        INIT_FCALL                                               'json_decode'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !2, $7
    6     7        INIT_FCALL                                               'json_decode'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 <true>
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !3, $9
    8    12        INIT_FCALL                                               'array_diff'
         13        SEND_VAR                                                 !2
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                         $11     
         16        ASSIGN                                                   !4, $11
   10    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !4
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.55 ms | 1400 KiB | 19 Q