3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = "http://www.youtube.com/watch?v=AmNOpdupQq4 http://www.youtube.com/watch?v=SMEWZshale4 http://www.youtube.com/watch?v=5jdCsMpU_8s http://www.youtube.com/watch?v=ABKaZXs4o1w http://www.youtube.com/watch?v=h6cKquKYikY http://www.youtube.com/watch?v=n-oja542woo http://www.youtube.com/watch?v=r1KGodz4suY http://www.youtube.com/watch?v=AJ7nEfXQuFo http://www.youtube.com/watch?v=3JNRjt0tO5g http://www.youtube.com/watch?v=OoVt2yrCANs http://www.youtube.com/watch?v=QGHygHLROrg http://www.youtube.com/watch?v=qXL7dLj_6YQ http://www.youtube.com/watch?v=A0bDKuZsdU4 http://www.youtube.com/watch?v=eNfXJMsrQz0 http://www.youtube.com/watch?v=tfILFRY27fw http://www.youtube.com/watch?v=nCphBKmDUcg http://www.youtube.com/watch?v=M6t3sFTS7oo"; preg_match_all("/(http.+)/", $content, $youtube_links); $link_id = 0; foreach ($youtube_links[0] as $i => $youtube_link) { $youtube_source = file_get_contents($youtube_link); preg_match('/(?<=url_encoded_fmt_stream_map"\: ")(.*?)(?=")/', $youtube_source, $data_source); preg_match('/(?<=(<title>))(.*?)(?=(<\/title>))/', $youtube_source, $title); $data = explode(",", $data_source[0]); foreach ($data as $url_data) { $url_data = str_replace("\u0026", "&", urldecode($url_data)); parse_str($url_data, $url_array); if ($url_array["quality"] != "hd720") { continue; } $url = $url_array["url"]; unset($url_array["url"]); unset($url_array["fallback_host"]); unset($url_array["type"]); unset($url_array["quality"]); echo $url; foreach($url_array as $key => $item) { echo "&" . $key . "=" . $item; } echo "&title=" . ($link_id<10?"0":"") . $link_id . " - " . $title[0]; echo "<br />"; break; } $link_id++; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 83
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 83
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 32, Position 2 = 80
Branch analysis from position: 32
2 jumps found. (Code = 78) Position 1 = 33, Position 2 = 80
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 50
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 50
2 jumps found. (Code = 77) Position 1 = 58, Position 2 = 65
Branch analysis from position: 58
2 jumps found. (Code = 78) Position 1 = 59, Position 2 = 65
Branch analysis from position: 59
1 jumps found. (Code = 42) Position 1 = 58
Branch analysis from position: 58
Branch analysis from position: 65
2 jumps found. (Code = 43) Position 1 = 68, Position 2 = 70
Branch analysis from position: 68
1 jumps found. (Code = 42) Position 1 = 71
Branch analysis from position: 71
1 jumps found. (Code = 42) Position 1 = 80
Branch analysis from position: 80
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 70
1 jumps found. (Code = 42) Position 1 = 80
Branch analysis from position: 80
Branch analysis from position: 65
Branch analysis from position: 80
Branch analysis from position: 80
Branch analysis from position: 83
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 83
filename:       /in/Ypnub
function name:  (null)
number of ops:  85
compiled vars:  !0 = $content, !1 = $youtube_links, !2 = $link_id, !3 = $youtube_link, !4 = $i, !5 = $youtube_source, !6 = $data_source, !7 = $title, !8 = $data, !9 = $url_data, !10 = $url_array, !11 = $url, !12 = $item, !13 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DAmNOpdupQq4%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DSMEWZshale4%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D5jdCsMpU_8s%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DABKaZXs4o1w%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dh6cKquKYikY%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dn-oja542woo%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dr1KGodz4suY%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DAJ7nEfXQuFo%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D3JNRjt0tO5g%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DOoVt2yrCANs%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DQGHygHLROrg%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DqXL7dLj_6YQ%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DA0bDKuZsdU4%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DeNfXJMsrQz0%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DtfILFRY27fw%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DnCphBKmDUcg%0Ahttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DM6t3sFTS7oo'
   20     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%28http.%2B%29%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
   22     6        ASSIGN                                                   !2, 0
   24     7        FETCH_DIM_R                                      ~17     !1, 0
          8      > FE_RESET_R                                       $18     ~17, ->83
          9    > > FE_FETCH_R                                       ~19     $18, !3, ->83
         10    >   ASSIGN                                                   !4, ~19
   25    11        INIT_FCALL                                               'file_get_contents'
         12        SEND_VAR                                                 !3
         13        DO_ICALL                                         $21     
         14        ASSIGN                                                   !5, $21
   26    15        INIT_FCALL                                               'preg_match'
         16        SEND_VAL                                                 '%2F%28%3F%3C%3Durl_encoded_fmt_stream_map%22%5C%3A+%22%29%28.%2A%3F%29%28%3F%3D%22%29%2F'
         17        SEND_VAR                                                 !5
         18        SEND_REF                                                 !6
         19        DO_ICALL                                                 
   27    20        INIT_FCALL                                               'preg_match'
         21        SEND_VAL                                                 '%2F%28%3F%3C%3D%28%3Ctitle%3E%29%29%28.%2A%3F%29%28%3F%3D%28%3C%5C%2Ftitle%3E%29%29%2F'
         22        SEND_VAR                                                 !5
         23        SEND_REF                                                 !7
         24        DO_ICALL                                                 
   28    25        INIT_FCALL                                               'explode'
         26        SEND_VAL                                                 '%2C'
         27        FETCH_DIM_R                                      ~25     !6, 0
         28        SEND_VAL                                                 ~25
         29        DO_ICALL                                         $26     
         30        ASSIGN                                                   !8, $26
   29    31      > FE_RESET_R                                       $28     !8, ->80
         32    > > FE_FETCH_R                                               $28, !9, ->80
   30    33    >   INIT_FCALL                                               'str_replace'
         34        SEND_VAL                                                 '%5Cu0026'
         35        SEND_VAL                                                 '%26'
         36        INIT_FCALL                                               'urldecode'
         37        SEND_VAR                                                 !9
         38        DO_ICALL                                         $29     
         39        SEND_VAR                                                 $29
         40        DO_ICALL                                         $30     
         41        ASSIGN                                                   !9, $30
   31    42        INIT_FCALL                                               'parse_str'
         43        SEND_VAR                                                 !9
         44        SEND_REF                                                 !10
         45        DO_ICALL                                                 
   32    46        FETCH_DIM_R                                      ~33     !10, 'quality'
         47        IS_NOT_EQUAL                                             ~33, 'hd720'
         48      > JMPZ                                                     ~34, ->50
   33    49    > > JMP                                                      ->32
   35    50    >   FETCH_DIM_R                                      ~35     !10, 'url'
         51        ASSIGN                                                   !11, ~35
   36    52        UNSET_DIM                                                !10, 'url'
   37    53        UNSET_DIM                                                !10, 'fallback_host'
   38    54        UNSET_DIM                                                !10, 'type'
   39    55        UNSET_DIM                                                !10, 'quality'
   40    56        ECHO                                                     !11
   41    57      > FE_RESET_R                                       $37     !10, ->65
         58    > > FE_FETCH_R                                       ~38     $37, !12, ->65
         59    >   ASSIGN                                                   !13, ~38
   42    60        CONCAT                                           ~40     '%26', !13
         61        CONCAT                                           ~41     ~40, '%3D'
         62        CONCAT                                           ~42     ~41, !12
         63        ECHO                                                     ~42
   41    64      > JMP                                                      ->58
         65    >   FE_FREE                                                  $37
   44    66        IS_SMALLER                                               !2, 10
         67      > JMPZ                                                     ~43, ->70
         68    >   QM_ASSIGN                                        ~44     '0'
         69      > JMP                                                      ->71
         70    >   QM_ASSIGN                                        ~44     ''
         71    >   CONCAT                                           ~45     '%26title%3D', ~44
         72        CONCAT                                           ~46     ~45, !2
         73        CONCAT                                           ~47     ~46, '+-+'
         74        FETCH_DIM_R                                      ~48     !7, 0
         75        CONCAT                                           ~49     ~47, ~48
         76        ECHO                                                     ~49
   45    77        ECHO                                                     '%3Cbr+%2F%3E'
   46    78      > JMP                                                      ->80
   29    79*       JMP                                                      ->32
         80    >   FE_FREE                                                  $28
   48    81        PRE_INC                                                  !2
   24    82      > JMP                                                      ->9
         83    >   FE_FREE                                                  $18
   51    84      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.03 ms | 1404 KiB | 27 Q