3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"1 filename.doc":{"name":"filename.doc","url":"https://example.com/filename.doc","file":"/var/www/example.com/filename.doc","type":"application/msword","size":50688}}'; $jsonArray = json_decode($json, true); foreach($jsonArray as $file=>$fileAttributes) { echo '<a href="'.$fileAttributes['url'].'">'.$fileAttributes['name'].'</a>'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/5TAWd
function name:  (null)
number of ops:  19
compiled vars:  !0 = $json, !1 = $jsonArray, !2 = $fileAttributes, !3 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B%221+filename.doc%22%3A%7B%22name%22%3A%22filename.doc%22%2C%22url%22%3A%22https%3A%2F%2Fexample.com%2Ffilename.doc%22%2C%22file%22%3A%22%2Fvar%2Fwww%2Fexample.com%2Ffilename.doc%22%2C%22type%22%3A%22application%2Fmsword%22%2C%22size%22%3A50688%7D%7D'
    4     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    6     6      > FE_RESET_R                                       $7      !1, ->17
          7    > > FE_FETCH_R                                       ~8      $7, !2, ->17
          8    >   ASSIGN                                                   !3, ~8
    7     9        FETCH_DIM_R                                      ~10     !2, 'url'
         10        CONCAT                                           ~11     '%3Ca+href%3D%22', ~10
         11        CONCAT                                           ~12     ~11, '%22%3E'
         12        FETCH_DIM_R                                      ~13     !2, 'name'
         13        CONCAT                                           ~14     ~12, ~13
         14        CONCAT                                           ~15     ~14, '%3C%2Fa%3E'
         15        ECHO                                                     ~15
    6    16      > JMP                                                      ->7
         17    >   FE_FREE                                                  $7
    8    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.21 ms | 997 KiB | 14 Q