3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "http://www.mediafire.com/api/folder/get_content.php?folder_key=uetm19hfa6znl&content_type=files"; $parent = json_decode(json_encode((array)simplexml_load_string(file_get_contents($url))),1); $content = $parent["folder_content"]; $results = $content["files"]; write("- Files"); $i = 0; foreach ($results as &$file) { $fname = $file[$i]["filename"]; $fkey = $file[$i]["quickkey"]; write("|- File: " . $fname); write(" |-- File Key: " . $fkey); write(' |-- Download: <a href="' . BuildURL($fname, $fkey) . '">Download!</a>'); $i++; } function write($string) { echo $string . "</br>"; } function BuildURL($name, $key) { $template = "https://www.mediafire.com/download/"; $url = $template . $key; $url = $url . "/" . urlencode($name); return $url; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 25, Position 2 = 51
Branch analysis from position: 25
2 jumps found. (Code = 126) Position 1 = 26, Position 2 = 51
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 51
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 51
filename:       /in/tVCDS
function name:  (null)
number of ops:  53
compiled vars:  !0 = $url, !1 = $parent, !2 = $content, !3 = $results, !4 = $i, !5 = $file, !6 = $fname, !7 = $fkey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fwww.mediafire.com%2Fapi%2Ffolder%2Fget_content.php%3Ffolder_key%3Duetm19hfa6znl%26content_type%3Dfiles'
    4     1        INIT_FCALL                                               'json_decode'
          2        INIT_FCALL                                               'json_encode'
          3        INIT_FCALL                                               'simplexml_load_string'
          4        INIT_FCALL                                               'file_get_contents'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $9      
          7        SEND_VAR                                                 $9
          8        DO_ICALL                                         $10     
          9        CAST                                          7  ~11     $10
         10        SEND_VAL                                                 ~11
         11        DO_ICALL                                         $12     
         12        SEND_VAR                                                 $12
         13        SEND_VAL                                                 1
         14        DO_ICALL                                         $13     
         15        ASSIGN                                                   !1, $13
    5    16        FETCH_DIM_R                                      ~15     !1, 'folder_content'
         17        ASSIGN                                                   !2, ~15
    6    18        FETCH_DIM_R                                      ~17     !2, 'files'
         19        ASSIGN                                                   !3, ~17
    8    20        INIT_FCALL_BY_NAME                                       'write'
         21        SEND_VAL_EX                                              '-+Files'
         22        DO_FCALL                                      0          
   10    23        ASSIGN                                                   !4, 0
   12    24      > FE_RESET_RW                                      $21     !3, ->51
         25    > > FE_FETCH_RW                                              $21, !5, ->51
   14    26    >   FETCH_DIM_R                                      ~22     !5, !4
         27        FETCH_DIM_R                                      ~23     ~22, 'filename'
         28        ASSIGN                                                   !6, ~23
   15    29        FETCH_DIM_R                                      ~25     !5, !4
         30        FETCH_DIM_R                                      ~26     ~25, 'quickkey'
         31        ASSIGN                                                   !7, ~26
   16    32        INIT_FCALL_BY_NAME                                       'write'
         33        CONCAT                                           ~28     '%7C-+File%3A+', !6
         34        SEND_VAL_EX                                              ~28
         35        DO_FCALL                                      0          
   17    36        INIT_FCALL_BY_NAME                                       'write'
         37        CONCAT                                           ~30     '++%7C--+File+Key%3A+', !7
         38        SEND_VAL_EX                                              ~30
         39        DO_FCALL                                      0          
   18    40        INIT_FCALL_BY_NAME                                       'write'
         41        INIT_FCALL_BY_NAME                                       'BuildURL'
         42        SEND_VAR_EX                                              !6
         43        SEND_VAR_EX                                              !7
         44        DO_FCALL                                      0  $32     
         45        CONCAT                                           ~33     '++%7C--+Download%3A+%3Ca+href%3D%22', $32
         46        CONCAT                                           ~34     ~33, '%22%3EDownload%21%3C%2Fa%3E'
         47        SEND_VAL_EX                                              ~34
         48        DO_FCALL                                      0          
   19    49        PRE_INC                                                  !4
   12    50      > JMP                                                      ->25
         51    >   FE_FREE                                                  $21
   34    52      > RETURN                                                   1

Function write:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tVCDS
function name:  write
number of ops:  4
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
   24     1        CONCAT                                           ~1      !0, '%3C%2Fbr%3E'
          2        ECHO                                                     ~1
   25     3      > RETURN                                                   null

End of function write

Function buildurl:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tVCDS
function name:  BuildURL
number of ops:  13
compiled vars:  !0 = $name, !1 = $key, !2 = $template, !3 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   29     2        ASSIGN                                                   !2, 'https%3A%2F%2Fwww.mediafire.com%2Fdownload%2F'
   30     3        CONCAT                                           ~5      !2, !1
          4        ASSIGN                                                   !3, ~5
   31     5        CONCAT                                           ~7      !3, '%2F'
          6        INIT_FCALL                                               'urlencode'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $8      
          9        CONCAT                                           ~9      ~7, $8
         10        ASSIGN                                                   !3, ~9
   32    11      > RETURN                                                   !3
   33    12*     > RETURN                                                   null

End of function buildurl

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.29 ms | 1392 KiB | 23 Q