3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tmpDomDocument = new DOMDocument(); $xml = '<?xml version="1.0" encoding="UTF-8"?><dummy xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><xfa:data> <form1> <TextField1>Value A</TextField1> <TextField1>Value B</TextField1> <TextField1>Value C</TextField1> </form1> </xfa:data></dummy>'; $tmpDomDocument->loadXML($xml); $dataNodes = $tmpDomDocument->firstChild->childNodes->item(0)->childNodes; var_dump($dataNodes->length); // var_dump($dataNodes->item(1)); // <form1> $datasetDom = new DOMDocument(); foreach ($dataNodes AS $node) { $node = $datasetDom->importNode($node, true); echo 1; } echo 2;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 30
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 30
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/MNakn
function name:  (null)
number of ops:  33
compiled vars:  !0 = $tmpDomDocument, !1 = $xml, !2 = $dataNodes, !3 = $datasetDom, !4 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $5      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $5
    5     3        ASSIGN                                                   !1, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%3Cdummy+xmlns%3Axfa%3D%22http%3A%2F%2Fwww.xfa.org%2Fschema%2Fxfa-data%2F1.0%2F%22%3E%3Cxfa%3Adata%3E%0A++%3Cform1%3E%0A++++%3CTextField1%3EValue+A%3C%2FTextField1%3E%0A++++%3CTextField1%3EValue+B%3C%2FTextField1%3E%0A++++%3CTextField1%3EValue+C%3C%2FTextField1%3E%0A++%3C%2Fform1%3E%0A%3C%2Fxfa%3Adata%3E%3C%2Fdummy%3E'
   13     4        INIT_METHOD_CALL                                         !0, 'loadXML'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0          
   15     7        FETCH_OBJ_R                                      ~10     !0, 'firstChild'
          8        FETCH_OBJ_R                                      ~11     ~10, 'childNodes'
          9        INIT_METHOD_CALL                                         ~11, 'item'
         10        SEND_VAL_EX                                              0
         11        DO_FCALL                                      0  $12     
         12        FETCH_OBJ_R                                      ~13     $12, 'childNodes'
         13        ASSIGN                                                   !2, ~13
   17    14        INIT_FCALL                                               'var_dump'
         15        FETCH_OBJ_R                                      ~15     !2, 'length'
         16        SEND_VAL                                                 ~15
         17        DO_ICALL                                                 
   19    18        NEW                                              $17     'DOMDocument'
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !3, $17
   21    21      > FE_RESET_R                                       $20     !2, ->30
         22    > > FE_FETCH_R                                               $20, !4, ->30
   22    23    >   INIT_METHOD_CALL                                         !3, 'importNode'
         24        SEND_VAR_EX                                              !4
         25        SEND_VAL_EX                                              <true>
         26        DO_FCALL                                      0  $21     
         27        ASSIGN                                                   !4, $21
   23    28        ECHO                                                     1
   21    29      > JMP                                                      ->22
         30    >   FE_FREE                                                  $20
   25    31        ECHO                                                     2
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.63 ms | 1396 KiB | 15 Q