3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument; $doc->loadXML('<tridas:object> <tridas:title>ppp</tridas:title> <tridas:type normalStd="Tellervo" normalId="1" normal="Site"/> <tridas:genericField name="tellervo.objectLabCode">2222</tridas:genericField> </tridas:object> '); $tellervoNS = "http://www.tellervo.org/schema/1.0"; $tridasNS = "http://www.tridas.org/1.2.2"; $xpath = new DOMXPath($doc); $xpath->registerNamespace('cor', $tellervoNS); $xpath->registerNamespace('tridas', $tridasNS); $fragment = $xpath->query("/cor:tellervo/cor:request/*"); foreach ($fragment as $item) { echo $item->nodeName, ' / ', $item->tagName; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 32
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 32
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/fN9ht
function name:  (null)
number of ops:  34
compiled vars:  !0 = $doc, !1 = $tellervoNS, !2 = $tridasNS, !3 = $xpath, !4 = $fragment, !5 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $6      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $6
    3     3        INIT_METHOD_CALL                                         !0, 'loadXML'
          4        SEND_VAL_EX                                              '%3Ctridas%3Aobject%3E+%3Ctridas%3Atitle%3Eppp%3C%2Ftridas%3Atitle%3E+%3Ctridas%3Atype+normalStd%3D%22Tellervo%22+normalId%3D%221%22+normal%3D%22Site%22%2F%3E+%3Ctridas%3AgenericField+name%3D%22tellervo.objectLabCode%22%3E2222%3C%2Ftridas%3AgenericField%3E+%3C%2Ftridas%3Aobject%3E%0A%0A'
          5        DO_FCALL                                      0          
    7     6        ASSIGN                                                   !1, 'http%3A%2F%2Fwww.tellervo.org%2Fschema%2F1.0'
    8     7        ASSIGN                                                   !2, 'http%3A%2F%2Fwww.tridas.org%2F1.2.2'
   11     8        NEW                                              $12     'DOMXPath'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !3, $12
   12    12        INIT_METHOD_CALL                                         !3, 'registerNamespace'
         13        SEND_VAL_EX                                              'cor'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0          
   13    16        INIT_METHOD_CALL                                         !3, 'registerNamespace'
         17        SEND_VAL_EX                                              'tridas'
         18        SEND_VAR_EX                                              !2
         19        DO_FCALL                                      0          
   15    20        INIT_METHOD_CALL                                         !3, 'query'
         21        SEND_VAL_EX                                              '%2Fcor%3Atellervo%2Fcor%3Arequest%2F%2A'
         22        DO_FCALL                                      0  $17     
         23        ASSIGN                                                   !4, $17
   17    24      > FE_RESET_R                                       $19     !4, ->32
         25    > > FE_FETCH_R                                               $19, !5, ->32
   20    26    >   FETCH_OBJ_R                                      ~20     !5, 'nodeName'
         27        ECHO                                                     ~20
         28        ECHO                                                     '+%2F+'
         29        FETCH_OBJ_R                                      ~21     !5, 'tagName'
         30        ECHO                                                     ~21
   17    31      > JMP                                                      ->25
         32    >   FE_FREE                                                  $19
   21    33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.17 ms | 1395 KiB | 13 Q