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->Entry as $Entry) { echo $Entry->Constituency.' , '.$Entry->State.' <br />'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/obBvj
function name:  (null)
number of ops:  18
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        FETCH_OBJ_R                                      ~7      ~6, 'Entry'
          7      > FE_RESET_R                                       $8      ~7, ->16
          8    > > FE_FETCH_R                                               $8, !2, ->16
   27     9    >   FETCH_OBJ_R                                      ~9      !2, 'Constituency'
         10        CONCAT                                           ~10     ~9, '+%2C+'
         11        FETCH_OBJ_R                                      ~11     !2, 'State'
         12        CONCAT                                           ~12     ~10, ~11
         13        CONCAT                                           ~13     ~12, '+%3Cbr+%2F%3E'
         14        ECHO                                                     ~13
   25    15      > JMP                                                      ->8
         16    >   FE_FREE                                                  $8
   29    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.48 ms | 1395 KiB | 15 Q