3v4l.org

run code in 500+ PHP versions simultaneously
<?php $html = '<html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <p>test</p> </body> </html>'; echo LIBXML_DOTTED_VERSION . PHP_EOL . PHP_EOL; $dom = new DOMDocument(); $dom->formatOutput = false; $dom->loadHTML($html); echo $dom->saveHTML($dom->documentElement) . PHP_EOL . PHP_EOL; echo $dom->saveHTML() . PHP_EOL . PHP_EOL; $dom = new DOMDocument(); $dom->formatOutput = false; $dom->loadHTML($html, LIBXML_PARSEHUGE); echo $dom->saveHTML($dom->documentElement) . PHP_EOL . PHP_EOL; echo $dom->saveHTML() . PHP_EOL . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d4RSn
function name:  (null)
number of ops:  46
compiled vars:  !0 = $html, !1 = $dom
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%3Chtml%3E%0A++%3Chead%3E%0A++++%3Cmeta+content%3D%22text%2Fhtml%3B+charset%3Dutf-8%22+http-equiv%3D%22Content-Type%22%3E%0A++%3C%2Fhead%3E%0A++%3Cbody+bgcolor%3D%22%23FFFFFF%22+text%3D%22%23000000%22%3E%0A++++%3Cp%3Etest%3C%2Fp%3E%0A++%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   12     1        ECHO                                                         '2.9.14%0A%0A'
   14     2        NEW                                                  $3      'DOMDocument'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !1, $3
   15     5        ASSIGN_OBJ                                                   !1, 'formatOutput'
          6        OP_DATA                                                      <false>
   16     7        INIT_METHOD_CALL                                             !1, 'loadHTML'
          8        SEND_VAR_EX                                                  !0
          9        DO_FCALL                                          0          
   17    10        INIT_METHOD_CALL                                             !1, 'saveHTML'
         11        CHECK_FUNC_ARG                                               
         12        FETCH_OBJ_FUNC_ARG                                   $8      !1, 'documentElement'
         13        SEND_FUNC_ARG                                                $8
         14        DO_FCALL                                          0  $9      
         15        CONCAT                                               ~10     $9, '%0A'
         16        CONCAT                                               ~11     ~10, '%0A'
         17        ECHO                                                         ~11
   18    18        INIT_METHOD_CALL                                             !1, 'saveHTML'
         19        DO_FCALL                                          0  $12     
         20        CONCAT                                               ~13     $12, '%0A'
         21        CONCAT                                               ~14     ~13, '%0A'
         22        ECHO                                                         ~14
   20    23        NEW                                                  $15     'DOMDocument'
         24        DO_FCALL                                          0          
         25        ASSIGN                                                       !1, $15
   21    26        ASSIGN_OBJ                                                   !1, 'formatOutput'
         27        OP_DATA                                                      <false>
   22    28        INIT_METHOD_CALL                                             !1, 'loadHTML'
         29        SEND_VAR_EX                                                  !0
         30        SEND_VAL_EX                                                  524288
         31        DO_FCALL                                          0          
   23    32        INIT_METHOD_CALL                                             !1, 'saveHTML'
         33        CHECK_FUNC_ARG                                               
         34        FETCH_OBJ_FUNC_ARG                                   $20     !1, 'documentElement'
         35        SEND_FUNC_ARG                                                $20
         36        DO_FCALL                                          0  $21     
         37        CONCAT                                               ~22     $21, '%0A'
         38        CONCAT                                               ~23     ~22, '%0A'
         39        ECHO                                                         ~23
   24    40        INIT_METHOD_CALL                                             !1, 'saveHTML'
         41        DO_FCALL                                          0  $24     
         42        CONCAT                                               ~25     $24, '%0A'
         43        CONCAT                                               ~26     ~25, '%0A'
         44        ECHO                                                         ~26
   25    45      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
216.16 ms | 1771 KiB | 8 Q