3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"outfits": [{"1": [{"category_id": "women_jeans", "product_id": 464540467}, {"category_id": "women_tops", "product_id": 487351815}, {"category_id": "women_coats", "product_id": 493322686}, {"category_id": "women_bags", "product_id": 483902882}, {"category_id": "women_shoes", "product_id": 492772225}]}]}'; $outfits = json_decode($json); var_dump($outfits->outfits[0]->category_id);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LNgiU
function name:  (null)
number of ops:  12
compiled vars:  !0 = $json, !1 = $outfits
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%22outfits%22%3A+%5B%7B%221%22%3A+%5B%7B%22category_id%22%3A+%22women_jeans%22%2C+%22product_id%22%3A+464540467%7D%2C+%7B%22category_id%22%3A+%22women_tops%22%2C+%22product_id%22%3A+487351815%7D%2C+%7B%22category_id%22%3A+%22women_coats%22%2C+%22product_id%22%3A+493322686%7D%2C+%7B%22category_id%22%3A+%22women_bags%22%2C+%22product_id%22%3A+483902882%7D%2C+%7B%22category_id%22%3A+%22women_shoes%22%2C+%22product_id%22%3A+492772225%7D%5D%7D%5D%7D'
    4     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    6     5        INIT_FCALL                                               'var_dump'
          6        FETCH_OBJ_R                                      ~5      !1, 'outfits'
          7        FETCH_DIM_R                                      ~6      ~5, 0
          8        FETCH_OBJ_R                                      ~7      ~6, 'category_id'
          9        SEND_VAL                                                 ~7
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
215.34 ms | 1394 KiB | 17 Q