3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml=simplexml_load_string(<<<XML <Records> <record> <Constituency>Smith</Constituency> <State>16753</State> <ElectionDate>UK</ElectionDate> <WikipediaLink>Qtr 3</WikipediaLink> <Election.inLink>Qtr 3</Election.inLink> </record> <record> <Constituency>Johnson</Constituency> <State>14808</State> <ElectionDate>USA</ElectionDate> <WikipediaLink>Qtr 4</WikipediaLink> <Election.inLink>Qtr 4</Election.inLink> </record> </Records> XML ); $Records = $xml; foreach ($Records->Record as $Entry) { echo $Entry->Constituency.' , '.$Entry->State.' <br />'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/LYFkP
function name:  (null)
number of ops:  17
compiled vars:  !0 = $xml, !1 = $Records, !2 = $Entry
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'simplexml_load_string'
    3     1        SEND_VAL                                                 '%3CRecords%3E%0A++%3Crecord%3E%0A+++++++%3CConstituency%3ESmith%3C%2FConstituency%3E%0A+++++++%3CState%3E16753%3C%2FState%3E%0A+++++++%3CElectionDate%3EUK%3C%2FElectionDate%3E%0A+++++++%3CWikipediaLink%3EQtr+3%3C%2FWikipediaLink%3E%0A+++++++%3CElection.inLink%3EQtr+3%3C%2FElection.inLink%3E%0A++++%3C%2Frecord%3E%0A++++%3Crecord%3E%0A+++++++%3CConstituency%3EJohnson%3C%2FConstituency%3E%0A+++++++%3CState%3E14808%3C%2FState%3E%0A+++++++%3CElectionDate%3EUSA%3C%2FElectionDate%3E%0A+++++++%3CWikipediaLink%3EQtr+4%3C%2FWikipediaLink%3E%0A+++++++%3CElection.inLink%3EQtr+4%3C%2FElection.inLink%3E%0A++++%3C%2Frecord%3E%0A%3C%2FRecords%3E'
          2        DO_ICALL                                         $3      
    2     3        ASSIGN                                                   !0, $3
   23     4        ASSIGN                                                   !1, !0
   25     5        FETCH_OBJ_R                                      ~6      !1, 'Record'
          6      > FE_RESET_R                                       $7      ~6, ->15
          7    > > FE_FETCH_R                                               $7, !2, ->15
   27     8    >   FETCH_OBJ_R                                      ~8      !2, 'Constituency'
          9        CONCAT                                           ~9      ~8, '+%2C+'
         10        FETCH_OBJ_R                                      ~10     !2, 'State'
         11        CONCAT                                           ~11     ~9, ~10
         12        CONCAT                                           ~12     ~11, '+%3Cbr+%2F%3E'
         13        ECHO                                                     ~12
   25    14      > JMP                                                      ->7
         15    >   FE_FREE                                                  $7
   29    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.26 ms | 1395 KiB | 15 Q