3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <Response id="responceidgoeshere"> <block name="addresses"> <block> <a name="building" format="text">#NAME/NUM#</a> <a name="sub-premise" format="text">#SUB-PREM#</a> <a name="street" format="text">#STREET#</a> <a name="locality" format="text">#LOCAL#</a> <a name="city" format="text">#CITY#</a> <a name="postcode" format="text">#POSTCODE#</a> <a name="ref" format="text">#REF#</a> <a name="csscode" format="text">#CSS#</a> </block> <block> <a name="building" format="text">#NAME/NUM#</a> <a name="street" format="text">#STREET#</a> <a name="locality" format="text">#LOCAL#</a> <a name="city" format="text">#CITY#</a> <a name="postcode" format="text">#POSTCODE#</a> <a name="ref" format="text"/> <a name="csscode" format="text"/> </block> </block> </Response> XML; $sxml = simplexml_load_string($xml); $result = []; foreach ($sxml->block->block as $block) { $row = []; foreach ($block->a as $a) { $row[(string) $a['name']] = (string) $a; } $result[] = $row; } print_r($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 24
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 24
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 20
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/mBoFO
function name:  (null)
number of ops:  29
compiled vars:  !0 = $xml, !1 = $sxml, !2 = $result, !3 = $block, !4 = $row, !5 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3CResponse+id%3D%22responceidgoeshere%22%3E%0A++%3Cblock+name%3D%22addresses%22%3E%0A++++%3Cblock%3E%0A++++++%3Ca+name%3D%22building%22+format%3D%22text%22%3E%23NAME%2FNUM%23%3C%2Fa%3E%0A++++++%3Ca+name%3D%22sub-premise%22+format%3D%22text%22%3E%23SUB-PREM%23%3C%2Fa%3E%0A++++++%3Ca+name%3D%22street%22+format%3D%22text%22%3E%23STREET%23%3C%2Fa%3E%0A++++++%3Ca+name%3D%22locality%22+format%3D%22text%22%3E%23LOCAL%23%3C%2Fa%3E%0A++++++%3Ca+name%3D%22city%22+format%3D%22text%22%3E%23CITY%23%3C%2Fa%3E%0A++++++%3Ca+name%3D%22postcode%22+format%3D%22text%22%3E%23POSTCODE%23%3C%2Fa%3E%0A++++++%3Ca+name%3D%22ref%22+format%3D%22text%22%3E%23REF%23%3C%2Fa%3E%0A++++++%3Ca+name%3D%22csscode%22+format%3D%22text%22%3E%23CSS%23%3C%2Fa%3E%0A++++%3C%2Fblock%3E%0A++++%3Cblock%3E%0A++++++%3Ca+name%3D%22building%22+format%3D%22text%22%3E%23NAME%2FNUM%23%3C%2Fa%3E%0A++++++%3Ca+name%3D%22street%22+format%3D%22text%22%3E%23STREET%23%3C%2Fa%3E%0A++++++%3Ca+name%3D%22locality%22+format%3D%22text%22%3E%23LOCAL%23%3C%2Fa%3E%0A++++++%3Ca+name%3D%22city%22+format%3D%22text%22%3E%23CITY%23%3C%2Fa%3E%0A++++++%3Ca+name%3D%22postcode%22+format%3D%22text%22%3E%23POSTCODE%23%3C%2Fa%3E%0A++++++%3Ca+name%3D%22ref%22+format%3D%22text%22%2F%3E%0A++++++%3Ca+name%3D%22csscode%22+format%3D%22text%22%2F%3E%0A++++%3C%2Fblock%3E%0A++++%3C%2Fblock%3E%0A%3C%2FResponse%3E'
   28     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
   30     5        ASSIGN                                                   !2, <array>
   32     6        FETCH_OBJ_R                                      ~10     !1, 'block'
          7        FETCH_OBJ_R                                      ~11     ~10, 'block'
          8      > FE_RESET_R                                       $12     ~11, ->24
          9    > > FE_FETCH_R                                               $12, !3, ->24
   33    10    >   ASSIGN                                                   !4, <array>
   35    11        FETCH_OBJ_R                                      ~14     !3, 'a'
         12      > FE_RESET_R                                       $15     ~14, ->20
         13    > > FE_FETCH_R                                               $15, !5, ->20
   36    14    >   FETCH_DIM_R                                      ~16     !5, 'name'
         15        CAST                                          6  ~17     ~16
         16        CAST                                          6  ~19     !5
         17        ASSIGN_DIM                                               !4, ~17
         18        OP_DATA                                                  ~19
   35    19      > JMP                                                      ->13
         20    >   FE_FREE                                                  $15
   39    21        ASSIGN_DIM                                               !2
         22        OP_DATA                                                  !4
   32    23      > JMP                                                      ->9
         24    >   FE_FREE                                                  $12
   42    25        INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.28 ms | 1008 KiB | 15 Q