3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<channel> <item> <title> Title A </title> <description> Description A </description> <stuff url="google.com" type="search engine"/> </item> <item> <title> Title B </title> <description> Description B </description> <stuff url="yahoo.com" type="old stuff"/> </item></channel>'; $x = new simplexmlelement($xml); foreach($x->item as $item){ echo $item->title . ' ' . $item->stuff['url'] . ' ' . $item->stuff['type'] . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 20
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 20
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/6ICrG
function name:  (null)
number of ops:  22
compiled vars:  !0 = $xml, !1 = $x, !2 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cchannel%3E%0A%3Citem%3E%0A++++%3Ctitle%3E+Title+A+%3C%2Ftitle%3E%0A++++%3Cdescription%3E+Description+A+%3C%2Fdescription%3E%0A++++%3Cstuff+url%3D%22google.com%22+type%3D%22search+engine%22%2F%3E%0A%3C%2Fitem%3E%0A%0A%3Citem%3E%0A++++%3Ctitle%3E+Title+B+%3C%2Ftitle%3E%0A++++%3Cdescription%3E+Description+B+%3C%2Fdescription%3E%0A++++%3Cstuff+url%3D%22yahoo.com%22+type%3D%22old+stuff%22%2F%3E%0A%3C%2Fitem%3E%3C%2Fchannel%3E'
   14     1        NEW                                              $4      'simplexmlelement'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
   15     5        FETCH_OBJ_R                                      ~7      !1, 'item'
          6      > FE_RESET_R                                       $8      ~7, ->20
          7    > > FE_FETCH_R                                               $8, !2, ->20
   16     8    >   FETCH_OBJ_R                                      ~9      !2, 'title'
          9        CONCAT                                           ~10     ~9, '+'
         10        FETCH_OBJ_R                                      ~11     !2, 'stuff'
         11        FETCH_DIM_R                                      ~12     ~11, 'url'
         12        CONCAT                                           ~13     ~10, ~12
         13        CONCAT                                           ~14     ~13, '+'
         14        FETCH_OBJ_R                                      ~15     !2, 'stuff'
         15        FETCH_DIM_R                                      ~16     ~15, 'type'
         16        CONCAT                                           ~17     ~14, ~16
         17        CONCAT                                           ~18     ~17, '%0A'
         18        ECHO                                                     ~18
   15    19      > JMP                                                      ->7
         20    >   FE_FREE                                                  $8
   17    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.32 ms | 997 KiB | 13 Q