3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rss ='<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"> <channel> <item> <media:content url="http://blog.com/image1.jpg" width="661" height="310"/> </item> </channel> </rss>'; $xml = simplexml_load_string($rss); foreach ($xml->channel->item->children("media", true) as $child) { echo $child->attributes()->url; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/o3Phg
function name:  (null)
number of ops:  20
compiled vars:  !0 = $rss, !1 = $xml, !2 = $child
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3Crss+version%3D%222.0%22+xmlns%3Amedia%3D%22http%3A%2F%2Fsearch.yahoo.com%2Fmrss%2F%22%3E%0A++++%3Cchannel%3E%0A++++++++%3Citem%3E%0A++++++++++++%3Cmedia%3Acontent+url%3D%22http%3A%2F%2Fblog.com%2Fimage1.jpg%22+width%3D%22661%22+height%3D%22310%22%2F%3E%0A++++++++%3C%2Fitem%3E%0A++++%3C%2Fchannel%3E%0A%3C%2Frss%3E'
   12     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   13     5        FETCH_OBJ_R                                      ~6      !1, 'channel'
          6        FETCH_OBJ_R                                      ~7      ~6, 'item'
          7        INIT_METHOD_CALL                                         ~7, 'children'
          8        SEND_VAL_EX                                              'media'
          9        SEND_VAL_EX                                              <true>
         10        DO_FCALL                                      0  $8      
         11      > FE_RESET_R                                       $9      $8, ->18
         12    > > FE_FETCH_R                                               $9, !2, ->18
   14    13    >   INIT_METHOD_CALL                                         !2, 'attributes'
         14        DO_FCALL                                      0  $10     
         15        FETCH_OBJ_R                                      ~11     $10, 'url'
         16        ECHO                                                     ~11
   13    17      > JMP                                                      ->12
         18    >   FE_FREE                                                  $9
   15    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.2 ms | 1075 KiB | 14 Q