3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '[ { "name":"Menu", "sub": [ { "name":"Menu 2", "url":"menu-2.php" } ] } ]'; $array = json_decode($json,1); print_r($array[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JZQCn
function name:  (null)
number of ops:  11
compiled vars:  !0 = $json, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%5B%0A++%7B%0A+++%22name%22%3A%22Menu%22%2C%0A+++%22sub%22%3A%0A+++%5B%0A+++++%7B%0A++++++%22name%22%3A%22Menu+2%22%2C%0A++++++%22url%22%3A%22menu-2.php%22%0A+++++%7D%0A+++%5D%0A++%7D%0A%5D'
   15     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 1
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   16     6        INIT_FCALL                                               'print_r'
          7        FETCH_DIM_R                                      ~5      !1, 0
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.46 ms | 1398 KiB | 17 Q