3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Start XML file, create parent node $dom=new DOMDocument("1.0"); $node=$dom->createElement("markers"); $parnode=$dom->appendChild($node); // Iterate through the rows, adding XML nodes for each for ($i = 0; $i < 3; $i++){ $node = $dom->createElement("marker"); $newnode = $parnode->appendChild($node); $newnode->setAttribute('foo', 'bar'); } echo $dom->saveXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 14
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 14
Branch analysis from position: 29
Branch analysis from position: 14
filename:       /in/DAYJo
function name:  (null)
number of ops:  33
compiled vars:  !0 = $dom, !1 = $node, !2 = $parnode, !3 = $i, !4 = $newnode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $5      'DOMDocument'
          1        SEND_VAL_EX                                              '1.0'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $5
    5     4        INIT_METHOD_CALL                                         !0, 'createElement'
          5        SEND_VAL_EX                                              'markers'
          6        DO_FCALL                                      0  $8      
          7        ASSIGN                                                   !1, $8
    6     8        INIT_METHOD_CALL                                         !0, 'appendChild'
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $10     
         11        ASSIGN                                                   !2, $10
    9    12        ASSIGN                                                   !3, 0
         13      > JMP                                                      ->27
   10    14    >   INIT_METHOD_CALL                                         !0, 'createElement'
         15        SEND_VAL_EX                                              'marker'
         16        DO_FCALL                                      0  $13     
         17        ASSIGN                                                   !1, $13
   11    18        INIT_METHOD_CALL                                         !2, 'appendChild'
         19        SEND_VAR_EX                                              !1
         20        DO_FCALL                                      0  $15     
         21        ASSIGN                                                   !4, $15
   12    22        INIT_METHOD_CALL                                         !4, 'setAttribute'
         23        SEND_VAL_EX                                              'foo'
         24        SEND_VAL_EX                                              'bar'
         25        DO_FCALL                                      0          
    9    26        PRE_INC                                                  !3
         27    >   IS_SMALLER                                               !3, 3
         28      > JMPNZ                                                    ~19, ->14
   15    29    >   INIT_METHOD_CALL                                         !0, 'saveXML'
         30        DO_FCALL                                      0  $20     
         31        ECHO                                                     $20
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.33 ms | 1395 KiB | 13 Q