3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getXML($url) { $Proxy = getenv("HTTP_PROXY"); if (strlen($Proxy) > 1) { $r_default_context = stream_context_get_default(array('http' => array('proxy' => $Proxy,'request_fulluri' => True,),)); libxml_set_streams_context($r_default_context); } $daten = simplexml_load_file($url); return ($daten); } ini_set("user_agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"); ini_set("max_execution_time", 0); ini_set("memory_limit", "10000M"); //These are here to hold back any errors from a user agent sniffer, if applicable. //I only put these here as a precaution and to add things to my code to make it look //like I was doing something important. echo "\t\t\t\t\t",'<div class="row center">',PHP_EOL; //For bootstrap, to wrap the videos up in a row so they can be displayed properly $user = 'KazenRacing'; //Set the username for later use $xml = getXML("http://gdata.youtube.com/feeds/api/users/$user/uploads"); //Loads the users Youtube feed data $total = $xml->totalResults; //This will give you how many videos are available in the feed for ($i=0; $i < $total; $i++){ //For loop determining how many videos to display based on the $total $id = basename($xml->entry[$i]->id); //This gets the id for each video. $title = $xml->entry[$i]->title; //This will get the title for each video. $recorded = date('jS F, Y', strtotime($xml->entry[$i]->recorded)); //This will get the recorded time of each video and display it by Day Month, Year. If not set will display 31st December, 1969 $description= $xml->entry[$i]->content; //This will get the video description, if any. echo "\t\t\t\t\t\t", '<div class="col-md-3 col-sm-6 col-xs-9 yt-div">',PHP_EOL, "\t\t\t\t\t\t\t", '<div class="well well-sm text-center">',PHP_EOL, "\t\t\t\t\t\t\t\t", '<h4>'.$title.'</h4>',PHP_EOL, "\t\t\t\t\t\t\t\t", '<div class="caption">',PHP_EOL, "\t\t\t\t\t\t\t\t\t", '<h5>'.$recorded.'</h5>',PHP_EOL, "\t\t\t\t\t\t\t\t\t",'<a rel="Video Gallery" class="swipebox" href="//youtu.be/'.$id.'" title="'.$title.'">', PHP_EOL, "\t\t\t\t\t\t\t\t\t\t",'<img src="thumbs.php?src=http://img.youtube.com/vi/'.$id.'/mqdefault.jpg&w=256" class="img-responsive img-thumb center-block" alt="'.$title.'"></a>',PHP_EOL, "\t\t\t\t\t\t\t\t\t",'<h6 class="text-justify">'.$description.'</h6>',PHP_EOL, "\t\t\t\t\t\t\t\t",'<hr>',PHP_EOL,//"\t\t\t\t\t\t\t\t\t",'<a href="//youtu.be/'.$id.'" class="btn btn-info btn-outlined" role="button">View on Youtube</a>',PHP_EOL, "\t\t\t\t\t\t\t\t", '</div>',PHP_EOL, "\t\t\t\t\t\t", '</div>', PHP_EOL, "\t\t\t\t\t", '</div>',PHP_EOL; //This echo displays all the information we set before using the $id, $title, $recorded, and $description variables. if ($i % 4 == 3) { echo "\t\t\t\t\t",'</div>',PHP_EOL, "\t\t\t\t\t",'<div class="row">',PHP_EOL; } //This if statement makes sure there is a new row for every four videos. } echo "\t\t\t\t\t",'</div>',PHP_EOL; //And here is the closing tag for our row div. ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 113
Branch analysis from position: 113
2 jumps found. (Code = 44) Position 1 = 115, Position 2 = 27
Branch analysis from position: 115
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 106, Position 2 = 112
Branch analysis from position: 106
2 jumps found. (Code = 44) Position 1 = 115, Position 2 = 27
Branch analysis from position: 115
Branch analysis from position: 27
Branch analysis from position: 112
filename:       /in/702ZZ
function name:  (null)
number of ops:  119
compiled vars:  !0 = $user, !1 = $xml, !2 = $total, !3 = $i, !4 = $id, !5 = $title, !6 = $recorded, !7 = $description
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'user_agent'
          2        SEND_VAL                                                 'Mozilla%2F4.0+%28compatible%3B+MSIE+6.0%3B+Windows+NT+5.0%29'
          3        DO_ICALL                                                 
   15     4        INIT_FCALL                                               'ini_set'
          5        SEND_VAL                                                 'max_execution_time'
          6        SEND_VAL                                                 0
          7        DO_ICALL                                                 
   16     8        INIT_FCALL                                               'ini_set'
          9        SEND_VAL                                                 'memory_limit'
         10        SEND_VAL                                                 '10000M'
         11        DO_ICALL                                                 
   21    12        ECHO                                                     '%09%09%09%09%09'
         13        ECHO                                                     '%3Cdiv+class%3D%22row+center%22%3E'
         14        ECHO                                                     '%0A'
   23    15        ASSIGN                                                   !0, 'KazenRacing'
   24    16        INIT_FCALL                                               'getxml'
         17        ROPE_INIT                                     3  ~13     'http%3A%2F%2Fgdata.youtube.com%2Ffeeds%2Fapi%2Fusers%2F'
         18        ROPE_ADD                                      1  ~13     ~13, !0
         19        ROPE_END                                      2  ~12     ~13, '%2Fuploads'
         20        SEND_VAL                                                 ~12
         21        DO_FCALL                                      0  $15     
         22        ASSIGN                                                   !1, $15
   26    23        FETCH_OBJ_R                                      ~17     !1, 'totalResults'
         24        ASSIGN                                                   !2, ~17
   28    25        ASSIGN                                                   !3, 0
         26      > JMP                                                      ->113
   29    27    >   INIT_FCALL                                               'basename'
         28        FETCH_OBJ_R                                      ~20     !1, 'entry'
         29        FETCH_DIM_R                                      ~21     ~20, !3
         30        FETCH_OBJ_R                                      ~22     ~21, 'id'
         31        SEND_VAL                                                 ~22
         32        DO_ICALL                                         $23     
         33        ASSIGN                                                   !4, $23
   30    34        FETCH_OBJ_R                                      ~25     !1, 'entry'
         35        FETCH_DIM_R                                      ~26     ~25, !3
         36        FETCH_OBJ_R                                      ~27     ~26, 'title'
         37        ASSIGN                                                   !5, ~27
   31    38        INIT_FCALL                                               'date'
         39        SEND_VAL                                                 'jS+F%2C+Y'
         40        INIT_FCALL                                               'strtotime'
         41        FETCH_OBJ_R                                      ~29     !1, 'entry'
         42        FETCH_DIM_R                                      ~30     ~29, !3
         43        FETCH_OBJ_R                                      ~31     ~30, 'recorded'
         44        SEND_VAL                                                 ~31
         45        DO_ICALL                                         $32     
         46        SEND_VAR                                                 $32
         47        DO_ICALL                                         $33     
         48        ASSIGN                                                   !6, $33
   32    49        FETCH_OBJ_R                                      ~35     !1, 'entry'
         50        FETCH_DIM_R                                      ~36     ~35, !3
         51        FETCH_OBJ_R                                      ~37     ~36, 'content'
         52        ASSIGN                                                   !7, ~37
   34    53        ECHO                                                     '%09%09%09%09%09%09'
         54        ECHO                                                     '%3Cdiv+class%3D%22col-md-3+col-sm-6+col-xs-9+yt-div%22%3E'
         55        ECHO                                                     '%0A'
   35    56        ECHO                                                     '%09%09%09%09%09%09%09'
         57        ECHO                                                     '%3Cdiv+class%3D%22well+well-sm+text-center%22%3E'
         58        ECHO                                                     '%0A'
   36    59        ECHO                                                     '%09%09%09%09%09%09%09%09'
         60        CONCAT                                           ~39     '%3Ch4%3E', !5
         61        CONCAT                                           ~40     ~39, '%3C%2Fh4%3E'
         62        ECHO                                                     ~40
         63        ECHO                                                     '%0A'
   37    64        ECHO                                                     '%09%09%09%09%09%09%09%09'
         65        ECHO                                                     '%3Cdiv+class%3D%22caption%22%3E'
         66        ECHO                                                     '%0A'
   38    67        ECHO                                                     '%09%09%09%09%09%09%09%09%09'
         68        CONCAT                                           ~41     '%3Ch5%3E', !6
         69        CONCAT                                           ~42     ~41, '%3C%2Fh5%3E'
         70        ECHO                                                     ~42
         71        ECHO                                                     '%0A'
   39    72        ECHO                                                     '%09%09%09%09%09%09%09%09%09'
         73        CONCAT                                           ~43     '%3Ca+rel%3D%22Video+Gallery%22+class%3D%22swipebox%22+href%3D%22%2F%2Fyoutu.be%2F', !4
         74        CONCAT                                           ~44     ~43, '%22+title%3D%22'
         75        CONCAT                                           ~45     ~44, !5
         76        CONCAT                                           ~46     ~45, '%22%3E'
         77        ECHO                                                     ~46
         78        ECHO                                                     '%0A'
   40    79        ECHO                                                     '%09%09%09%09%09%09%09%09%09%09'
         80        CONCAT                                           ~47     '%3Cimg+src%3D%22thumbs.php%3Fsrc%3Dhttp%3A%2F%2Fimg.youtube.com%2Fvi%2F', !4
         81        CONCAT                                           ~48     ~47, '%2Fmqdefault.jpg%26w%3D256%22+class%3D%22img-responsive+img-thumb+center-block%22+alt%3D%22'
         82        CONCAT                                           ~49     ~48, !5
         83        CONCAT                                           ~50     ~49, '%22%3E%3C%2Fa%3E'
         84        ECHO                                                     ~50
         85        ECHO                                                     '%0A'
   41    86        ECHO                                                     '%09%09%09%09%09%09%09%09%09'
         87        CONCAT                                           ~51     '%3Ch6+class%3D%22text-justify%22%3E', !7
         88        CONCAT                                           ~52     ~51, '%3C%2Fh6%3E'
         89        ECHO                                                     ~52
         90        ECHO                                                     '%0A'
   42    91        ECHO                                                     '%09%09%09%09%09%09%09%09'
         92        ECHO                                                     '%3Chr%3E'
         93        ECHO                                                     '%0A'
   43    94        ECHO                                                     '%09%09%09%09%09%09%09%09'
         95        ECHO                                                     '%3C%2Fdiv%3E'
         96        ECHO                                                     '%0A'
         97        ECHO                                                     '%09%09%09%09%09%09'
         98        ECHO                                                     '%3C%2Fdiv%3E'
         99        ECHO                                                     '%0A'
        100        ECHO                                                     '%09%09%09%09%09'
        101        ECHO                                                     '%3C%2Fdiv%3E'
        102        ECHO                                                     '%0A'
   45   103        MOD                                              ~53     !3, 4
        104        IS_EQUAL                                                 ~53, 3
        105      > JMPZ                                                     ~54, ->112
   46   106    >   ECHO                                                     '%09%09%09%09%09'
        107        ECHO                                                     '%3C%2Fdiv%3E'
        108        ECHO                                                     '%0A'
   47   109        ECHO                                                     '%09%09%09%09%09'
        110        ECHO                                                     '%3Cdiv+class%3D%22row%22%3E'
        111        ECHO                                                     '%0A'
   28   112    >   PRE_INC                                                  !3
        113    >   IS_SMALLER                                               !3, !2
        114      > JMPNZ                                                    ~56, ->27
   51   115    >   ECHO                                                     '%09%09%09%09%09'
        116        ECHO                                                     '%3C%2Fdiv%3E'
        117        ECHO                                                     '%0A'
   52   118      > RETURN                                                   1

Function getxml:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 18
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/702ZZ
function name:  getXML
number of ops:  24
compiled vars:  !0 = $url, !1 = $Proxy, !2 = $r_default_context, !3 = $daten
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'getenv'
          2        SEND_VAL                                                 'HTTP_PROXY'
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    6     5        STRLEN                                           ~6      !1
          6        IS_SMALLER                                               1, ~6
          7      > JMPZ                                                     ~7, ->18
    7     8    >   INIT_FCALL                                               'stream_context_get_default'
          9        INIT_ARRAY                                       ~8      !1, 'proxy'
         10        ADD_ARRAY_ELEMENT                                ~8      <true>, 'request_fulluri'
         11        INIT_ARRAY                                       ~9      ~8, 'http'
         12        SEND_VAL                                                 ~9
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !2, $10
    8    15        INIT_FCALL                                               'libxml_set_streams_context'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
   10    18    >   INIT_FCALL                                               'simplexml_load_file'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $13     
         21        ASSIGN                                                   !3, $13
   11    22      > RETURN                                                   !3
   12    23*     > RETURN                                                   null

End of function getxml

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.32 ms | 1411 KiB | 30 Q