3v4l.org

run code in 300+ PHP versions simultaneously
<?php $response = '{"items": [{"id":"1","food":"rice","Amount":"100","condition":"paid"},\ {"id":"2","food":"beans","Amount":"200","condition":"paid"},\ {"id":"3","food":"yam","Amount":"50","condition":"not paid"},\ {"id":"4","food":"tomatoes","Amount":"100","condition":"paid"},\ {"id":"5","food":"potato","Amount":"700","condition":"paid"}]}'; $arr = json_decode(stripslashes($response), true); var_dump($arr); echo $arr['items'][1]['food']; // beans
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WslYh
function name:  (null)
number of ops:  17
compiled vars:  !0 = $response, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%22items%22%3A%0A+++++++++%5B%7B%22id%22%3A%221%22%2C%22food%22%3A%22rice%22%2C%22Amount%22%3A%22100%22%2C%22condition%22%3A%22paid%22%7D%2C%5C%0A++++++++++%7B%22id%22%3A%222%22%2C%22food%22%3A%22beans%22%2C%22Amount%22%3A%22200%22%2C%22condition%22%3A%22paid%22%7D%2C%5C%0A++++++++++%7B%22id%22%3A%223%22%2C%22food%22%3A%22yam%22%2C%22Amount%22%3A%2250%22%2C%22condition%22%3A%22not+paid%22%7D%2C%5C%0A++++++++++%7B%22id%22%3A%224%22%2C%22food%22%3A%22tomatoes%22%2C%22Amount%22%3A%22100%22%2C%22condition%22%3A%22paid%22%7D%2C%5C%0A++++++++++%7B%22id%22%3A%225%22%2C%22food%22%3A%22potato%22%2C%22Amount%22%3A%22700%22%2C%22condition%22%3A%22paid%22%7D%5D%7D'
   10     1        INIT_FCALL                                               'json_decode'
          2        INIT_FCALL                                               'stripslashes'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        SEND_VAR                                                 $3
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !1, $4
   11     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   12    12        FETCH_DIM_R                                      ~7      !1, 'items'
         13        FETCH_DIM_R                                      ~8      ~7, 1
         14        FETCH_DIM_R                                      ~9      ~8, 'food'
         15        ECHO                                                     ~9
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.7 ms | 1007 KiB | 16 Q