3v4l.org

run code in 300+ PHP versions simultaneously
<?php $externalProducts = json_decode('{ "Filter": { "Title": "All Products" }, "Products": [{ "Type": "Jacket", "Price": 75, "ExpiryDate": "2018-06-30", "StockNumber": "180220/003", "Created": "2018-02-20 12:24:06", "Modified": "2018-05-30 02:00:23" }, { "Type": "Jeans", "Price": 150, "ExpiryDate": "2018-06-30", "StockNumber": "180221/004", "Created": "2017-08-10 15:11:44", "Modified": "2018-05-30 02:00:22" }, { "Type": "Jacket", "Price": 240, "ExpiryDate": "2018-06-30", "StockNumber": "150804/012", "Created": "2015-08-04 17:03:42", "Modified": "2018-05-30 02:00:22" } ] }',true); $internalProducts = json_decode('"localProducts": [{ "title": "Fur Coat", "id": 16526, "created_at": "2018-05-17T10:15:45Z", "updated_at": "2018-05-17T10:15:45Z", "sku": "180514/001", "price": "75.00", "regular_price": "75.00", "categories": [ "Jackets", ], }, { "title": "Ripped Jeans", "id": 16527, "created_at": "2018-05-17T10:15:45Z", "updated_at": "2018-05-17T10:15:45Z", "sku": "180221/004", "price": "150.00", "regular_price": "150.00", "categories": [ "Jeans", ], }, { "title": "Leather Jacket", "id": 16528, "created_at": "2018-05-17T10:15:45Z", "updated_at": "2018-05-17T10:15:45Z", "sku": "150804/012", "price": "240.00", "regular_price": "240.00", "categories": [ "Jackets", ], } ]',true); var_dump($internalProducts); $extstock = array_column($externalProducts, "StockNumber"); $intsku = array_column($internalProducts, "sku"); var_dump(array_diff($extstock, $intsku));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bl744
function name:  (null)
number of ops:  31
compiled vars:  !0 = $externalProducts, !1 = $internalProducts, !2 = $extstock, !3 = $intsku
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%7B%0A%22Filter%22%3A+%7B%0A++++%22Title%22%3A+%22All+Products%22%0A%7D%2C%0A%22Products%22%3A+%5B%7B%0A++++++++%22Type%22%3A+%22Jacket%22%2C%0A++++++++%22Price%22%3A+75%2C%0A++++++++%22ExpiryDate%22%3A+%222018-06-30%22%2C%0A++++++++%22StockNumber%22%3A+%22180220%2F003%22%2C%0A++++++++%22Created%22%3A+%222018-02-20+12%3A24%3A06%22%2C%0A++++++++%22Modified%22%3A+%222018-05-30+02%3A00%3A23%22%0A++++%7D%2C%0A++++%7B%0A++++++++%22Type%22%3A+%22Jeans%22%2C%0A++++++++%22Price%22%3A+150%2C%0A++++++++%22ExpiryDate%22%3A+%222018-06-30%22%2C%0A++++++++%22StockNumber%22%3A+%22180221%2F004%22%2C%0A++++++++%22Created%22%3A+%222017-08-10+15%3A11%3A44%22%2C%0A++++++++%22Modified%22%3A+%222018-05-30+02%3A00%3A22%22%0A++++%7D%2C%0A++++%7B%0A++++++++%22Type%22%3A+%22Jacket%22%2C%0A++++++++%22Price%22%3A+240%2C%0A++++++++%22ExpiryDate%22%3A+%222018-06-30%22%2C%0A++++++++%22StockNumber%22%3A+%22150804%2F012%22%2C%0A++++++++%22Created%22%3A+%222015-08-04+17%3A03%3A42%22%2C%0A++++++++%22Modified%22%3A+%222018-05-30+02%3A00%3A22%22%0A++++%7D%0A++++%5D%0A%7D'
   32     2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $4      
    3     4        ASSIGN                                                   !0, $4
   33     5        INIT_FCALL                                               'json_decode'
          6        SEND_VAL                                                 '%22localProducts%22%3A+%5B%7B%0A++++%22title%22%3A+%22Fur+Coat%22%2C%0A++++%22id%22%3A+16526%2C%0A++++%22created_at%22%3A+%222018-05-17T10%3A15%3A45Z%22%2C%0A++++%22updated_at%22%3A+%222018-05-17T10%3A15%3A45Z%22%2C%0A++++%22sku%22%3A+%22180514%2F001%22%2C%0A++++%22price%22%3A+%2275.00%22%2C%0A++++%22regular_price%22%3A+%2275.00%22%2C%0A++++%22categories%22%3A+%5B%0A++++++++%22Jackets%22%2C%0A++++%5D%2C%0A%7D%2C%0A%7B%0A++++%22title%22%3A+%22Ripped+Jeans%22%2C%0A++++%22id%22%3A+16527%2C%0A++++%22created_at%22%3A+%222018-05-17T10%3A15%3A45Z%22%2C%0A++++%22updated_at%22%3A+%222018-05-17T10%3A15%3A45Z%22%2C%0A++++%22sku%22%3A+%22180221%2F004%22%2C%0A++++%22price%22%3A+%22150.00%22%2C%0A++++%22regular_price%22%3A+%22150.00%22%2C%0A++++%22categories%22%3A+%5B%0A++++++++%22Jeans%22%2C%0A++++%5D%2C%0A%7D%2C%0A%7B%0A++++%22title%22%3A+%22Leather+Jacket%22%2C%0A++++%22id%22%3A+16528%2C%0A++++%22created_at%22%3A+%222018-05-17T10%3A15%3A45Z%22%2C%0A++++%22updated_at%22%3A+%222018-05-17T10%3A15%3A45Z%22%2C%0A++++%22sku%22%3A+%22150804%2F012%22%2C%0A++++%22price%22%3A+%22240.00%22%2C%0A++++%22regular_price%22%3A+%22240.00%22%2C%0A++++%22categories%22%3A+%5B%0A++++++++%22Jackets%22%2C%0A++++%5D%2C%0A++++%7D%0A%5D'
   69     7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $6      
   33     9        ASSIGN                                                   !1, $6
   71    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
   72    13        INIT_FCALL                                               'array_column'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 'StockNumber'
         16        DO_ICALL                                         $9      
         17        ASSIGN                                                   !2, $9
   73    18        INIT_FCALL                                               'array_column'
         19        SEND_VAR                                                 !1
         20        SEND_VAL                                                 'sku'
         21        DO_ICALL                                         $11     
         22        ASSIGN                                                   !3, $11
   75    23        INIT_FCALL                                               'var_dump'
         24        INIT_FCALL                                               'array_diff'
         25        SEND_VAR                                                 !2
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                         $13     
         28        SEND_VAR                                                 $13
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.09 ms | 1400 KiB | 21 Q