3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "https://www.youtube.com/feeds/videos.xml?user=XLLease"; $rss = simplexml_load_file($url); // XML parser //getNamespaces $ns=$rss->getNamespaces(true); foreach($rss->entry as $entry) { //set children of namespaces $yt=$entry->children($ns['yt']); $media=$entry->children($ns['media']); foreach ($media as $key => $value) { $url = $value->thumbnail->attributes()->url->__toString(); var_dump($url); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 40
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 40
Branch analysis from position: 12
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 38
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 38
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 38
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
filename:       /in/IvWQJ
function name:  (null)
number of ops:  42
compiled vars:  !0 = $url, !1 = $rss, !2 = $ns, !3 = $entry, !4 = $yt, !5 = $media, !6 = $value, !7 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'https%3A%2F%2Fwww.youtube.com%2Ffeeds%2Fvideos.xml%3Fuser%3DXLLease'
    4     1        INIT_FCALL                                               'simplexml_load_file'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $9      
          4        ASSIGN                                                   !1, $9
    7     5        INIT_METHOD_CALL                                         !1, 'getNamespaces'
          6        SEND_VAL_EX                                              <true>
          7        DO_FCALL                                      0  $11     
          8        ASSIGN                                                   !2, $11
    9     9        FETCH_OBJ_R                                      ~13     !1, 'entry'
         10      > FE_RESET_R                                       $14     ~13, ->40
         11    > > FE_FETCH_R                                               $14, !3, ->40
   11    12    >   INIT_METHOD_CALL                                         !3, 'children'
         13        CHECK_FUNC_ARG                                           
         14        FETCH_DIM_FUNC_ARG                               $15     !2, 'yt'
         15        SEND_FUNC_ARG                                            $15
         16        DO_FCALL                                      0  $16     
         17        ASSIGN                                                   !4, $16
   12    18        INIT_METHOD_CALL                                         !3, 'children'
         19        CHECK_FUNC_ARG                                           
         20        FETCH_DIM_FUNC_ARG                               $18     !2, 'media'
         21        SEND_FUNC_ARG                                            $18
         22        DO_FCALL                                      0  $19     
         23        ASSIGN                                                   !5, $19
   13    24      > FE_RESET_R                                       $21     !5, ->38
         25    > > FE_FETCH_R                                       ~22     $21, !6, ->38
         26    >   ASSIGN                                                   !7, ~22
   14    27        FETCH_OBJ_R                                      ~24     !6, 'thumbnail'
         28        INIT_METHOD_CALL                                         ~24, 'attributes'
         29        DO_FCALL                                      0  $25     
         30        FETCH_OBJ_R                                      ~26     $25, 'url'
         31        INIT_METHOD_CALL                                         ~26, '__toString'
         32        DO_FCALL                                      0  $27     
         33        ASSIGN                                                   !0, $27
   15    34        INIT_FCALL                                               'var_dump'
         35        SEND_VAR                                                 !0
         36        DO_ICALL                                                 
   13    37      > JMP                                                      ->25
         38    >   FE_FREE                                                  $21
    9    39      > JMP                                                      ->11
         40    >   FE_FREE                                                  $14
   17    41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.31 ms | 1400 KiB | 17 Q