3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<?xml version="1.0" encoding="UTF-8"?> <root> <item id="images"> <images handle="kings-of-leon_poster_v02_webjpg" path="workspace/assets/uploads/" type="file">kings of leon_poster_v02_WEB.jpg</images> </item> <item id="about"> <page-name handle="new-age" type="page-name">New Age</page-name> </item> <item id="about"> <page-name handle="new-age-2" type="page-name">New Age 2</page-name> </item> <item id="images"> <images handle="aae_seating-plan_v01jpg" path="workspace/assets/uploads/" type="file">AAE_Seating-plan_v01.jpg</images> </item> <item id="images"> <images handle="evidence-of-communication-between-myself-and-external-sourcespng" path="workspace/assets/uploads/" type="file">evidence-of-communication-between-myself-and-external-sources.png</images> </item> </root> '; $dom = new DOMDocument; $dom->loadXML($xml); //var_dump($dom); $xpath = new DOMXPath($dom); $res1 = $xpath->query('//root/item[@id="images"]'); foreach($res1 as $res){ var_dump($res); } // var_dump($res1); $item = $res1; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/SAc7e
function name:  (null)
number of ops:  24
compiled vars:  !0 = $xml, !1 = $dom, !2 = $xpath, !3 = $res1, !4 = $res, !5 = $item
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%3Croot%3E%0A++++++++%3Citem+id%3D%22images%22%3E%0A+++++++++%3Cimages+handle%3D%22kings-of-leon_poster_v02_webjpg%22+path%3D%22workspace%2Fassets%2Fuploads%2F%22+type%3D%22file%22%3Ekings+of+leon_poster_v02_WEB.jpg%3C%2Fimages%3E%0A++++++++%3C%2Fitem%3E%0A++++++++%3Citem+id%3D%22about%22%3E%0A+++++++++%3Cpage-name+handle%3D%22new-age%22+type%3D%22page-name%22%3ENew+Age%3C%2Fpage-name%3E%0A++++++++%3C%2Fitem%3E%0A++++++++%3Citem+id%3D%22about%22%3E%0A+++++++++%3Cpage-name+handle%3D%22new-age-2%22+type%3D%22page-name%22%3ENew+Age+2%3C%2Fpage-name%3E%0A++++++++%3C%2Fitem%3E%0A++++++++%3Citem+id%3D%22images%22%3E%0A+++++++++%3Cimages+handle%3D%22aae_seating-plan_v01jpg%22+path%3D%22workspace%2Fassets%2Fuploads%2F%22+type%3D%22file%22%3EAAE_Seating-plan_v01.jpg%3C%2Fimages%3E%0A++++++++%3C%2Fitem%3E%0A++++++++%3Citem+id%3D%22images%22%3E%0A+++++++++%3Cimages+handle%3D%22evidence-of-communication-between-myself-and-external-sourcespng%22+path%3D%22workspace%2Fassets%2Fuploads%2F%22+type%3D%22file%22%3Eevidence-of-communication-between-myself-and-external-sources.png%3C%2Fimages%3E%0A++++++++%3C%2Fitem%3E%0A%3C%2Froot%3E%0A'
   24     1        NEW                                              $7      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $7
   25     4        INIT_METHOD_CALL                                         !1, 'loadXML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   27     7        NEW                                              $11     'DOMXPath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $11
   29    11        INIT_METHOD_CALL                                         !2, 'query'
         12        SEND_VAL_EX                                              '%2F%2Froot%2Fitem%5B%40id%3D%22images%22%5D'
         13        DO_FCALL                                      0  $14     
         14        ASSIGN                                                   !3, $14
   30    15      > FE_RESET_R                                       $16     !3, ->21
         16    > > FE_FETCH_R                                               $16, !4, ->21
   31    17    >   INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !4
         19        DO_ICALL                                                 
   30    20      > JMP                                                      ->16
         21    >   FE_FREE                                                  $16
   34    22        ASSIGN                                                   !5, !3
   39    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.13 ms | 1396 KiB | 15 Q