3v4l.org

run code in 300+ PHP versions simultaneously
<?php $debug = true; $id = 'crl_Z6uwups'; $type = 'mp4'; $url = 'http://youtube.com/get_video_info?video_id='; $key = 'url_encoded_fmt_stream_map'; $content = file_get_contents($url.$id); parse_str($content, $result); /*if($debug) { echo $url.$id.'<br/>'; echo $key.'<br/>'; echo $type.'<br/>'; echo '<pre>'; print_r($result); echo '</pre>'; } else { header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="videofile.'.$type.'"'); } */ $type = 'type=video/'.$type; $files = explode(',url=', $result[$key]); $files[0] = substr($files[0], 4); for($i=0; $i<count($files); $i++) { $file = urldecode($files[$i]); $found = strpos($file, $type) > -1; if ($found){ echo '<a href="'.$file.'">'.$file.'</a><br/><br/>'; } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 31
Branch analysis from position: 52
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 48
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 31
Branch analysis from position: 52
Branch analysis from position: 31
Branch analysis from position: 48
filename:       /in/qiKaR
function name:  (null)
number of ops:  53
compiled vars:  !0 = $debug, !1 = $id, !2 = $type, !3 = $url, !4 = $key, !5 = $content, !6 = $result, !7 = $files, !8 = $i, !9 = $file, !10 = $found
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <true>
    4     1        ASSIGN                                                   !1, 'crl_Z6uwups'
    5     2        ASSIGN                                                   !2, 'mp4'
    8     3        ASSIGN                                                   !3, 'http%3A%2F%2Fyoutube.com%2Fget_video_info%3Fvideo_id%3D'
    9     4        ASSIGN                                                   !4, 'url_encoded_fmt_stream_map'
   10     5        INIT_FCALL                                               'file_get_contents'
          6        CONCAT                                           ~16     !3, !1
          7        SEND_VAL                                                 ~16
          8        DO_ICALL                                         $17     
          9        ASSIGN                                                   !5, $17
   11    10        INIT_FCALL                                               'parse_str'
         11        SEND_VAR                                                 !5
         12        SEND_REF                                                 !6
         13        DO_ICALL                                                 
   28    14        CONCAT                                           ~20     'type%3Dvideo%2F', !2
         15        ASSIGN                                                   !2, ~20
   29    16        INIT_FCALL                                               'explode'
         17        SEND_VAL                                                 '%2Curl%3D'
         18        FETCH_DIM_R                                      ~22     !6, !4
         19        SEND_VAL                                                 ~22
         20        DO_ICALL                                         $23     
         21        ASSIGN                                                   !7, $23
   30    22        INIT_FCALL                                               'substr'
         23        FETCH_DIM_R                                      ~26     !7, 0
         24        SEND_VAL                                                 ~26
         25        SEND_VAL                                                 4
         26        DO_ICALL                                         $27     
         27        ASSIGN_DIM                                               !7, 0
         28        OP_DATA                                                  $27
   32    29        ASSIGN                                                   !8, 0
         30      > JMP                                                      ->49
   34    31    >   INIT_FCALL                                               'urldecode'
         32        FETCH_DIM_R                                      ~29     !7, !8
         33        SEND_VAL                                                 ~29
         34        DO_ICALL                                         $30     
         35        ASSIGN                                                   !9, $30
   35    36        INIT_FCALL                                               'strpos'
         37        SEND_VAR                                                 !9
         38        SEND_VAR                                                 !2
         39        DO_ICALL                                         $32     
         40        IS_SMALLER                                       ~33     -1, $32
         41        ASSIGN                                                   !10, ~33
   37    42      > JMPZ                                                     !10, ->48
   38    43    >   CONCAT                                           ~35     '%3Ca+href%3D%22', !9
         44        CONCAT                                           ~36     ~35, '%22%3E'
         45        CONCAT                                           ~37     ~36, !9
         46        CONCAT                                           ~38     ~37, '%3C%2Fa%3E%3Cbr%2F%3E%3Cbr%2F%3E'
         47        ECHO                                                     ~38
   32    48    >   PRE_INC                                                  !8
         49    >   COUNT                                            ~40     !7
         50        IS_SMALLER                                               !8, ~40
         51      > JMPNZ                                                    ~41, ->31
   41    52    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.17 ms | 1400 KiB | 25 Q