3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = <<<JSON {"g_aaa77": {"'title'":"title2", "'r_a6cff'": {"name":"name2","price":"2"}, "'r_7fc7b'": {"name":"name22","price":"22"} }, "g_a36b5": {"title":"title1", "r_4e122": {"name":"name1","price":"1"}, "r_155fa": {"name":"name11","price":"11"} } } JSON; $array = json_decode($json, true); print_r($array); $array = array_values($array); print_r($array); echo $array[1]['title'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s2it1
function name:  (null)
number of ops:  20
compiled vars:  !0 = $json, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%22g_aaa77%22%3A%0A++++%7B%22%27title%27%22%3A%22title2%22%2C%0A++++++++%22%27r_a6cff%27%22%3A++++++++++++++++%0A++++++++++++%7B%22name%22%3A%22name2%22%2C%22price%22%3A%222%22%7D%2C%0A++++++++%22%27r_7fc7b%27%22%3A+++%0A++++++++++++%7B%22name%22%3A%22name22%22%2C%22price%22%3A%2222%22%7D%0A+++++%7D%2C%0A+%22g_a36b5%22%3A%0A+++++%7B%22title%22%3A%22title1%22%2C%0A+++++++++%22r_4e122%22%3A+%0A+++++++++++++%7B%22name%22%3A%22name1%22%2C%22price%22%3A%221%22%7D%2C%0A+++++++++%22r_155fa%22%3A%0A+++++++++++++%7B%22name%22%3A%22name11%22%2C%22price%22%3A%2211%22%7D%0A+++++%7D%0A%7D'
   21     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   23     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   25     9        INIT_FCALL                                               'array_values'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !1, $6
   27    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
   29    16        FETCH_DIM_R                                      ~9      !1, 1
         17        FETCH_DIM_R                                      ~10     ~9, 'title'
         18        ECHO                                                     ~10
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.5 ms | 1447 KiB | 16 Q