3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml1 = '<some id="whatever" />'; $xml2 = ' <some id=\'whatever\'/>'; $dom = new DOMDocument(); $dom->loadXML($xml1); echo $dom->saveXml(); $dom = new DOMDocument(); $dom->loadXML($xml2); echo $dom->saveXml();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ReFjW
function name:  (null)
number of ops:  21
compiled vars:  !0 = $xml1, !1 = $xml2, !2 = $dom
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Csome+id%3D%22whatever%22+%2F%3E'
    4     1        ASSIGN                                                   !1, '++++%3Csome+++id%3D%27whatever%27%2F%3E'
    6     2        NEW                                              $5      'DOMDocument'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !2, $5
    7     5        INIT_METHOD_CALL                                         !2, 'loadXML'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
    8     8        INIT_METHOD_CALL                                         !2, 'saveXml'
          9        DO_FCALL                                      0  $9      
         10        ECHO                                                     $9
   10    11        NEW                                              $10     'DOMDocument'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $10
   11    14        INIT_METHOD_CALL                                         !2, 'loadXML'
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0          
   12    17        INIT_METHOD_CALL                                         !2, 'saveXml'
         18        DO_FCALL                                      0  $14     
         19        ECHO                                                     $14
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.17 ms | 1393 KiB | 13 Q