3v4l.org

run code in 300+ PHP versions simultaneously
<?php $responseContent = <<<XML <?xml version = "1.0" encoding = "utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetListItemsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/"> <GetListItemsResult> <listitems xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882' xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882' xmlns:rs='urn:schemas-microsoft-com:rowset' xmlns:z='#RowsetSchema'> <rs:data> <z:row ows_ID="128" /> </rs:data> </listitems> </GetListItemsResult> </GetListItemsResponse> </soap:Body> </soap:Envelope> XML; $xml_element = simplexml_load_string($responseContent); $name_spaces = $xml_element->getNamespaces(true); $rows = $xml_element ->children($name_spaces['soap']) ->Body ->children() ->GetListItemsResponse ->GetListItemsResult ->listitems ->children($name_spaces['rs']) ->children($name_spaces['z']); foreach ($rows as $row) { $ows_ID = $row->attributes()->ows_ID; var_dump($ows_ID); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 32, Position 2 = 41
Branch analysis from position: 32
2 jumps found. (Code = 78) Position 1 = 33, Position 2 = 41
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
filename:       /in/7dNf9
function name:  (null)
number of ops:  43
compiled vars:  !0 = $responseContent, !1 = $xml_element, !2 = $name_spaces, !3 = $rows, !4 = $row, !5 = $ows_ID
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version+%3D+%221.0%22+encoding+%3D+%22utf-8%22%3F%3E%0A%3Csoap%3AEnvelope+xmlns%3Asoap%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F%22%3E%0A++++%3Csoap%3ABody%3E%0A++++++++%3CGetListItemsResponse+xmlns%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2Fsoap%2F%22%3E%0A++++++++++++%3CGetListItemsResult%3E%0A++++++++++++++++%3Clistitems+xmlns%3As%3D%27uuid%3ABDC6E3F0-6DA3-11d1-A2A3-00AA00C14882%27%0A+++++xmlns%3Adt%3D%27uuid%3AC2F41010-65B3-11d1-A29F-00AA00C14882%27%0A+++++xmlns%3Ars%3D%27urn%3Aschemas-microsoft-com%3Arowset%27%0A+++++xmlns%3Az%3D%27%23RowsetSchema%27%3E%0A++++++++++++++++++++%3Crs%3Adata%3E%0A++++++++++++++++++++++++%3Cz%3Arow+ows_ID%3D%22128%22+%2F%3E%0A++++++++++++++++++++%3C%2Frs%3Adata%3E%0A++++++++++++++++%3C%2Flistitems%3E%0A++++++++++++%3C%2FGetListItemsResult%3E%0A++++++++%3C%2FGetListItemsResponse%3E%0A++++%3C%2Fsoap%3ABody%3E%0A%3C%2Fsoap%3AEnvelope%3E'
   23     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
   24     5        INIT_METHOD_CALL                                         !1, 'getNamespaces'
          6        SEND_VAL_EX                                              <true>
          7        DO_FCALL                                      0  $9      
          8        ASSIGN                                                   !2, $9
   27     9        INIT_METHOD_CALL                                         !1, 'children'
         10        CHECK_FUNC_ARG                                           
         11        FETCH_DIM_FUNC_ARG                               $11     !2, 'soap'
         12        SEND_FUNC_ARG                                            $11
         13        DO_FCALL                                      0  $12     
   28    14        FETCH_OBJ_R                                      ~13     $12, 'Body'
   29    15        INIT_METHOD_CALL                                         ~13, 'children'
         16        DO_FCALL                                      0  $14     
   30    17        FETCH_OBJ_R                                      ~15     $14, 'GetListItemsResponse'
   31    18        FETCH_OBJ_R                                      ~16     ~15, 'GetListItemsResult'
   32    19        FETCH_OBJ_R                                      ~17     ~16, 'listitems'
   33    20        INIT_METHOD_CALL                                         ~17, 'children'
         21        CHECK_FUNC_ARG                                           
         22        FETCH_DIM_FUNC_ARG                               $18     !2, 'rs'
         23        SEND_FUNC_ARG                                            $18
         24        DO_FCALL                                      0  $19     
   34    25        INIT_METHOD_CALL                                         $19, 'children'
         26        CHECK_FUNC_ARG                                           
         27        FETCH_DIM_FUNC_ARG                               $20     !2, 'z'
         28        SEND_FUNC_ARG                                            $20
         29        DO_FCALL                                      0  $21     
   26    30        ASSIGN                                                   !3, $21
   36    31      > FE_RESET_R                                       $23     !3, ->41
         32    > > FE_FETCH_R                                               $23, !4, ->41
   37    33    >   INIT_METHOD_CALL                                         !4, 'attributes'
         34        DO_FCALL                                      0  $24     
         35        FETCH_OBJ_R                                      ~25     $24, 'ows_ID'
         36        ASSIGN                                                   !5, ~25
   38    37        INIT_FCALL                                               'var_dump'
         38        SEND_VAR                                                 !5
         39        DO_ICALL                                                 
   36    40      > JMP                                                      ->32
         41    >   FE_FREE                                                  $23
   39    42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
231.9 ms | 1006 KiB | 15 Q