3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument; $doc->loadXML(' <?xml version="1.0" encoding="UTF-8"?> <c:tellervo xmlns:c="http://www.tellervo.org/schema/1.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:tridas="http://www.tridas.org/1.2.2"> <c:request type="create"> <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> </c:request> </c:tellervo> '); $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/4f9XV
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                                              '%0A%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3Cc%3Atellervo+xmlns%3Ac%3D%22http%3A%2F%2Fwww.tellervo.org%2Fschema%2F1.0%22+xmlns%3Agml%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%22+xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22+xmlns%3Atridas%3D%22http%3A%2F%2Fwww.tridas.org%2F1.2.2%22%3E%0A++%3Cc%3Arequest+type%3D%22create%22%3E%0A%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%3C%2Fc%3Arequest%3E%0A%3C%2Fc%3Atellervo%3E%0A'
          5        DO_FCALL                                      0          
   12     6        ASSIGN                                                   !1, 'http%3A%2F%2Fwww.tellervo.org%2Fschema%2F1.0'
   13     7        ASSIGN                                                   !2, 'http%3A%2F%2Fwww.tridas.org%2F1.2.2'
   16     8        NEW                                              $12     'DOMXPath'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !3, $12
   17    12        INIT_METHOD_CALL                                         !3, 'registerNamespace'
         13        SEND_VAL_EX                                              'cor'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0          
   18    16        INIT_METHOD_CALL                                         !3, 'registerNamespace'
         17        SEND_VAL_EX                                              'tridas'
         18        SEND_VAR_EX                                              !2
         19        DO_FCALL                                      0          
   20    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
   22    24      > FE_RESET_R                                       $19     !4, ->32
         25    > > FE_FETCH_R                                               $19, !5, ->32
   25    26    >   FETCH_OBJ_R                                      ~20     !5, 'nodeName'
         27        ECHO                                                     ~20
         28        ECHO                                                     '+%2F+'
         29        FETCH_OBJ_R                                      ~21     !5, 'tagName'
         30        ECHO                                                     ~21
   22    31      > JMP                                                      ->25
         32    >   FE_FREE                                                  $19
   26    33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.61 ms | 1399 KiB | 13 Q