3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<lib id="ITEM_I_WANT_TO_DOWNLOAD_1" revision="0000"> <part id="0000" type="ch"/> <part id="0000" type="ls"/> <part id="0000" type="rs"/> <part id="0000" type="ch"/> </lib> <lib id="ITEM_I_WANT_TO_DOWNLOAD_2" revision="0000"> <part id="0000" type="ch"/> <part id="0000" type="ls"/> <part id="0000" type="rs"/> <part id="0000" type="ch"/> </lib>'; $document = new DOMDocument(); $document->loadXml($xml); $xpath = new DOMXpath($document); foreach ($xpath->evaluate('//lib/@id') as $attr) { $result[] = $attr->value; } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/20SAp
function name:  (null)
number of ops:  25
compiled vars:  !0 = $xml, !1 = $document, !2 = $xpath, !3 = $attr, !4 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Clib+id%3D%22ITEM_I_WANT_TO_DOWNLOAD_1%22+revision%3D%220000%22%3E%0A++++%3Cpart+id%3D%220000%22+type%3D%22ch%22%2F%3E%0A++++%3Cpart+id%3D%220000%22+type%3D%22ls%22%2F%3E%0A++++%3Cpart+id%3D%220000%22+type%3D%22rs%22%2F%3E%0A++++%3Cpart+id%3D%220000%22+type%3D%22ch%22%2F%3E%0A++%3C%2Flib%3E%0A%3Clib+id%3D%22ITEM_I_WANT_TO_DOWNLOAD_2%22+revision%3D%220000%22%3E%0A++++%3Cpart+id%3D%220000%22+type%3D%22ch%22%2F%3E%0A++++%3Cpart+id%3D%220000%22+type%3D%22ls%22%2F%3E%0A++++%3Cpart+id%3D%220000%22+type%3D%22rs%22%2F%3E%0A++++%3Cpart+id%3D%220000%22+type%3D%22ch%22%2F%3E%0A++%3C%2Flib%3E'
   15     1        NEW                                              $6      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $6
   16     4        INIT_METHOD_CALL                                         !1, 'loadXml'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   17     7        NEW                                              $10     'DOMXpath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $10
   18    11        INIT_METHOD_CALL                                         !2, 'evaluate'
         12        SEND_VAL_EX                                              '%2F%2Flib%2F%40id'
         13        DO_FCALL                                      0  $13     
         14      > FE_RESET_R                                       $14     $13, ->20
         15    > > FE_FETCH_R                                               $14, !3, ->20
   19    16    >   FETCH_OBJ_R                                      ~16     !3, 'value'
         17        ASSIGN_DIM                                               !4
         18        OP_DATA                                                  ~16
   18    19      > JMP                                                      ->15
         20    >   FE_FREE                                                  $14
   21    21        INIT_FCALL                                               'var_export'
         22        SEND_VAR                                                 !4
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.69 ms | 1396 KiB | 15 Q