3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sample = <<<'EOT' { "movie": { "genre": [ { "code": 13025, "$": "Action" }, { "code": 13012, "$": "Fantastique" } ] } } EOT; $var = json_decode($sample, true); var_dump($var, $var['movie']['genre'][1]['$']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LhVGr
function name:  (null)
number of ops:  15
compiled vars:  !0 = $sample, !1 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B%0A++%22movie%22%3A+%7B%0A++++%22genre%22%3A+%5B%0A++++++%7B%0A++++++++%22code%22%3A+13025%2C%0A++++++++%22%24%22%3A+%22Action%22%0A++++++%7D%2C%0A++++++%7B%0A++++++++%22code%22%3A+13012%2C%0A++++++++%22%24%22%3A+%22Fantastique%22%0A++++++%7D%0A++++%5D%0A++++%7D%0A%7D'
   19     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   21     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        FETCH_DIM_R                                      ~5      !1, 'movie'
          9        FETCH_DIM_R                                      ~6      ~5, 'genre'
         10        FETCH_DIM_R                                      ~7      ~6, 1
         11        FETCH_DIM_R                                      ~8      ~7, '%24'
         12        SEND_VAL                                                 ~8
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.12 ms | 1394 KiB | 17 Q