3v4l.org

run code in 300+ PHP versions simultaneously
<?php $document = new DOMDocument(); $document->loadXML('<foo />'); $xpath = new DOMXPath($document); $xpath->registerNamespace('sig', 'http://www.w3.org/2000/09/xmldsig#'); $node = $xpath->query('//*[not(sig:SignatureValue)]'); $node->item(0)->nodeValue = 'sig'; var_dump($document->asXML());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qDpE8
function name:  (null)
number of ops:  30
compiled vars:  !0 = $document, !1 = $xpath, !2 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    3     3        INIT_METHOD_CALL                                         !0, 'loadXML'
          4        SEND_VAL_EX                                              '%3Cfoo+%2F%3E'
          5        DO_FCALL                                      0          
    5     6        NEW                                              $7      'DOMXPath'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $7
    6    10        INIT_METHOD_CALL                                         !1, 'registerNamespace'
         11        SEND_VAL_EX                                              'sig'
         12        SEND_VAL_EX                                              'http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23'
         13        DO_FCALL                                      0          
    7    14        INIT_METHOD_CALL                                         !1, 'query'
         15        SEND_VAL_EX                                              '%2F%2F%2A%5Bnot%28sig%3ASignatureValue%29%5D'
         16        DO_FCALL                                      0  $11     
         17        ASSIGN                                                   !2, $11
    8    18        INIT_METHOD_CALL                                         !2, 'item'
         19        SEND_VAL_EX                                              0
         20        DO_FCALL                                      0  $13     
         21        SEPARATE                                         $13     $13
         22        ASSIGN_OBJ                                               $13, 'nodeValue'
         23        OP_DATA                                                  'sig'
   10    24        INIT_FCALL                                               'var_dump'
         25        INIT_METHOD_CALL                                         !0, 'asXML'
         26        DO_FCALL                                      0  $15     
         27        SEND_VAR                                                 $15
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.18 ms | 1387 KiB | 15 Q