3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<< EOT <?xml version='1.0' encoding='UTF-8'?> <rowset name="keys" key="keyID" columns="keyID,vCode"> <row keyID="3169149" vCode="FQVKg5iK2k5gnMnafK6fn0K3QUKnWzjRoSv5C2TpgEtC8qFqH9Ism2E4IcFOPkgR" /> <row keyID="3184662" vCode="u7G74sPhQgKz7AqYclI40xlHWqbc7b8bZzPYDC0B4tPXnvNLHu8XbbGyert1YLMs" /> </rowset> EOT; $simpleXML = simplexml_load_string($xml); // Load XML string data into the simplexml object parser foreach ($simpleXML->result->rowset->row as $row) { $titles = []; $name = $row['keyID']->__toString(); foreach($row as $attrib){ if($attrib['keyID']->__toString() === 'titles'){ foreach($attrib as $title){ $titles[] = $title['titleName']->__toString(); } } } echo $keyID . ' : ' . implode(' - ', $titles) . "<br/>\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 42
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 42
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 32
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 32
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 31
Branch analysis from position: 22
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 30
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 30
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 30
Branch analysis from position: 31
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 32
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
filename:       /in/JRtpo
function name:  (null)
number of ops:  44
compiled vars:  !0 = $xml, !1 = $simpleXML, !2 = $row, !3 = $titles, !4 = $name, !5 = $attrib, !6 = $title, !7 = $keyID
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%271.0%27+encoding%3D%27UTF-8%27%3F%3E%0A%3Crowset+name%3D%22keys%22+key%3D%22keyID%22+columns%3D%22keyID%2CvCode%22%3E%0A%09%3Crow+keyID%3D%223169149%22+vCode%3D%22FQVKg5iK2k5gnMnafK6fn0K3QUKnWzjRoSv5C2TpgEtC8qFqH9Ism2E4IcFOPkgR%22+%2F%3E%0A%09%3Crow+keyID%3D%223184662%22+vCode%3D%22u7G74sPhQgKz7AqYclI40xlHWqbc7b8bZzPYDC0B4tPXnvNLHu8XbbGyert1YLMs%22+%2F%3E%09%0A%3C%2Frowset%3E'
   10     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $9      
          4        ASSIGN                                                   !1, $9
   12     5        FETCH_OBJ_R                                      ~11     !1, 'result'
          6        FETCH_OBJ_R                                      ~12     ~11, 'rowset'
          7        FETCH_OBJ_R                                      ~13     ~12, 'row'
          8      > FE_RESET_R                                       $14     ~13, ->42
          9    > > FE_FETCH_R                                               $14, !2, ->42
   13    10    >   ASSIGN                                                   !3, <array>
   14    11        FETCH_DIM_R                                      ~16     !2, 'keyID'
         12        INIT_METHOD_CALL                                         ~16, '__toString'
         13        DO_FCALL                                      0  $17     
         14        ASSIGN                                                   !4, $17
   15    15      > FE_RESET_R                                       $19     !2, ->32
         16    > > FE_FETCH_R                                               $19, !5, ->32
   16    17    >   FETCH_DIM_R                                      ~20     !5, 'keyID'
         18        INIT_METHOD_CALL                                         ~20, '__toString'
         19        DO_FCALL                                      0  $21     
         20        IS_IDENTICAL                                             $21, 'titles'
         21      > JMPZ                                                     ~22, ->31
   17    22    > > FE_RESET_R                                       $23     !5, ->30
         23    > > FE_FETCH_R                                               $23, !6, ->30
   18    24    >   FETCH_DIM_R                                      ~25     !6, 'titleName'
         25        INIT_METHOD_CALL                                         ~25, '__toString'
         26        DO_FCALL                                      0  $26     
         27        ASSIGN_DIM                                               !3
         28        OP_DATA                                                  $26
   17    29      > JMP                                                      ->23
         30    >   FE_FREE                                                  $23
   15    31    > > JMP                                                      ->16
         32    >   FE_FREE                                                  $19
   22    33        CONCAT                                           ~27     !7, '+%3A+'
         34        INIT_FCALL                                               'implode'
         35        SEND_VAL                                                 '+-+'
         36        SEND_VAR                                                 !3
         37        DO_ICALL                                         $28     
         38        CONCAT                                           ~29     ~27, $28
         39        CONCAT                                           ~30     ~29, '%3Cbr%2F%3E%0A'
         40        ECHO                                                     ~30
   12    41      > JMP                                                      ->9
         42    >   FE_FREE                                                  $14
   23    43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.79 ms | 1400 KiB | 17 Q