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> '; $sxe = simplexml_load_string($xml); $doc = dom_import_simplexml ($sxe); $dom = new DOMDocument('1.0'); $xpath = new DOMXPath($dom); $doc = $dom->importNode($doc, true); $doc = $dom->appendChild($doc); $res1 = $xpath->query('/root/[*/@handle = "kings-of-leon_poster_v02_webjpg"]'); var_dump($res1); $item = $res1;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VBYIG
function name:  (null)
number of ops:  35
compiled vars:  !0 = $xml, !1 = $sxe, !2 = $doc, !3 = $dom, !4 = $xpath, !5 = $res1, !6 = $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'
   23     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $8      
          4        ASSIGN                                                   !1, $8
   24     5        INIT_FCALL                                               'dom_import_simplexml'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $10     
          8        ASSIGN                                                   !2, $10
   25     9        NEW                                              $12     'DOMDocument'
         10        SEND_VAL_EX                                              '1.0'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !3, $12
   26    13        NEW                                              $15     'DOMXPath'
         14        SEND_VAR_EX                                              !3
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !4, $15
   27    17        INIT_METHOD_CALL                                         !3, 'importNode'
         18        SEND_VAR_EX                                              !2
         19        SEND_VAL_EX                                              <true>
         20        DO_FCALL                                      0  $18     
         21        ASSIGN                                                   !2, $18
   28    22        INIT_METHOD_CALL                                         !3, 'appendChild'
         23        SEND_VAR_EX                                              !2
         24        DO_FCALL                                      0  $20     
         25        ASSIGN                                                   !2, $20
   29    26        INIT_METHOD_CALL                                         !4, 'query'
         27        SEND_VAL_EX                                              '%2Froot%2F%5B%2A%2F%40handle+%3D+%22kings-of-leon_poster_v02_webjpg%22%5D'
         28        DO_FCALL                                      0  $22     
         29        ASSIGN                                                   !5, $22
   31    30        INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !5
         32        DO_ICALL                                                 
   32    33        ASSIGN                                                   !6, !5
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.46 ms | 1392 KiB | 19 Q