3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "1":{ "data":"123", "more_data":"456" }, "2":{ "data":"789", "more_data":"123" } }'; $data = json_decode($json, true); foreach($data as $uniqueID => $single) { echo 'Unique-ID: ' . $uniqueID . PHP_EOL; echo 'data: ' . $single['data'] . PHP_EOL; echo 'more_data: ' . $single['more_data'] . PHP_EOL; echo PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 22
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 22
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/FZikX
function name:  (null)
number of ops:  24
compiled vars:  !0 = $json, !1 = $data, !2 = $single, !3 = $uniqueID
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%0A++++%221%22%3A%7B%0A++++++++%22data%22%3A%22123%22%2C%0A++++++++%22more_data%22%3A%22456%22%0A++++%7D%2C%0A++++%222%22%3A%7B%0A++++++++%22data%22%3A%22789%22%2C%0A++++++++%22more_data%22%3A%22123%22%0A++++%7D%0A%7D'
   14     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
   16     6      > FE_RESET_R                                       $7      !1, ->22
          7    > > FE_FETCH_R                                       ~8      $7, !2, ->22
          8    >   ASSIGN                                                   !3, ~8
   17     9        CONCAT                                           ~10     'Unique-ID%3A+', !3
         10        CONCAT                                           ~11     ~10, '%0A'
         11        ECHO                                                     ~11
   18    12        FETCH_DIM_R                                      ~12     !2, 'data'
         13        CONCAT                                           ~13     'data%3A+', ~12
         14        CONCAT                                           ~14     ~13, '%0A'
         15        ECHO                                                     ~14
   19    16        FETCH_DIM_R                                      ~15     !2, 'more_data'
         17        CONCAT                                           ~16     'more_data%3A+', ~15
         18        CONCAT                                           ~17     ~16, '%0A'
         19        ECHO                                                     ~17
   20    20        ECHO                                                     '%0A'
   16    21      > JMP                                                      ->7
         22    >   FE_FREE                                                  $7
   21    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
257.77 ms | 1002 KiB | 14 Q