3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = <<<END &lt;?xml version="1.0" ?&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta content="TX21_HTM 21.0.406.501" name="GENERATOR" /&gt; &lt;title&gt;&lt;/title&gt; &lt;/head&gt; &lt;body style="font-family:'Arial';font-size:12pt;text-align:left;"&gt; &lt;p lang="en-US" style="margin-top:0pt;margin-bottom:0pt;"&gt;&lt;span style="font-family:'Verdana';font-size:9pt;"&gt;ABC1.&lt;/span&gt;&lt;/p&gt; &lt;p lang="en-US" style="margin-top:0pt;margin-bottom:0pt;"&gt;&lt;span style="font-family:'Verdana';font-size:9pt;"&gt;(ABC2)&lt;/span&gt;&lt;/p&gt; &lt;p lang="en-US" style="margin-top:0pt;margin-bottom:0pt;"&gt;&lt;span style="font-family:'Verdana';font-size:9pt;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p lang="en-US" style="margin-top:0pt;margin-bottom:0pt;"&gt;&lt;span style="font-family:'Verdana';font-size:9pt;"&gt;ABC3&lt;/span&gt;&lt;/p&gt; &lt;/body&gt; &lt;/html&gt; END; $dom =new DOMDocument('1.0','utf-8'); $element = $dom->createElement('test', $content); $dom->appendChild($element); //header('Content-type: text/xml;'); echo $dom->saveXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MPQGc
function name:  (null)
number of ops:  18
compiled vars:  !0 = $content, !1 = $dom, !2 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%26lt%3B%3Fxml+version%3D%221.0%22+%3F%26gt%3B%0A%26lt%3Bhtml+xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%26gt%3B%0A%26lt%3Bhead%26gt%3B%0A%26lt%3Bmeta+content%3D%22TX21_HTM+21.0.406.501%22+name%3D%22GENERATOR%22+%2F%26gt%3B%0A%26lt%3Btitle%26gt%3B%26lt%3B%2Ftitle%26gt%3B%0A%26lt%3B%2Fhead%26gt%3B%0A%26lt%3Bbody+style%3D%22font-family%3A%27Arial%27%3Bfont-size%3A12pt%3Btext-align%3Aleft%3B%22%26gt%3B%0A%26lt%3Bp+lang%3D%22en-US%22+style%3D%22margin-top%3A0pt%3Bmargin-bottom%3A0pt%3B%22%26gt%3B%26lt%3Bspan+style%3D%22font-family%3A%27Verdana%27%3Bfont-size%3A9pt%3B%22%26gt%3BABC1.%26lt%3B%2Fspan%26gt%3B%26lt%3B%2Fp%26gt%3B%0A%26lt%3Bp+lang%3D%22en-US%22+style%3D%22margin-top%3A0pt%3Bmargin-bottom%3A0pt%3B%22%26gt%3B%26lt%3Bspan+style%3D%22font-family%3A%27Verdana%27%3Bfont-size%3A9pt%3B%22%26gt%3B%28ABC2%29%26lt%3B%2Fspan%26gt%3B%26lt%3B%2Fp%26gt%3B%0A%26lt%3Bp+lang%3D%22en-US%22+style%3D%22margin-top%3A0pt%3Bmargin-bottom%3A0pt%3B%22%26gt%3B%26lt%3Bspan+style%3D%22font-family%3A%27Verdana%27%3Bfont-size%3A9pt%3B%22%26gt%3B+%26lt%3B%2Fspan%26gt%3B%26lt%3B%2Fp%26gt%3B%0A%26lt%3Bp+lang%3D%22en-US%22+style%3D%22margin-top%3A0pt%3Bmargin-bottom%3A0pt%3B%22%26gt%3B%26lt%3Bspan+style%3D%22font-family%3A%27Verdana%27%3Bfont-size%3A9pt%3B%22%26gt%3BABC3%26lt%3B%2Fspan%26gt%3B%26lt%3B%2Fp%26gt%3B%0A%0A%26lt%3B%2Fbody%26gt%3B%0A%26lt%3B%2Fhtml%26gt%3B'
   20     1        NEW                                              $4      'DOMDocument'
          2        SEND_VAL_EX                                              '1.0'
          3        SEND_VAL_EX                                              'utf-8'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $4
   21     6        INIT_METHOD_CALL                                         !1, 'createElement'
          7        SEND_VAL_EX                                              'test'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $7      
         10        ASSIGN                                                   !2, $7
   22    11        INIT_METHOD_CALL                                         !1, 'appendChild'
         12        SEND_VAR_EX                                              !2
         13        DO_FCALL                                      0          
   24    14        INIT_METHOD_CALL                                         !1, 'saveXML'
         15        DO_FCALL                                      0  $10     
         16        ECHO                                                     $10
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
214.7 ms | 996 KiB | 13 Q