3v4l.org

run code in 300+ PHP versions simultaneously
<?php $beautifier = new DOMDocument('', 'UTF-8'); $beautifier->preserveWhiteSpace = false; $beautifier->formatOutput = true; $beautifier->loadHTML(<<<'HTML' <!DOCTYPE html> <html> <head><title>Hello world</title> <meta charset="UTF-8"> </head><body> <header>test</header> </body> </html> HTML , LIBXML_NOERROR); echo $beautifier->saveHTML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ur76E
function name:  (null)
number of ops:  17
compiled vars:  !0 = $beautifier
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'DOMDocument'
          1        SEND_VAL_EX                                              ''
          2        SEND_VAL_EX                                              'UTF-8'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
    4     5        ASSIGN_OBJ                                               !0, 'preserveWhiteSpace'
          6        OP_DATA                                                  <false>
    5     7        ASSIGN_OBJ                                               !0, 'formatOutput'
          8        OP_DATA                                                  <true>
    6     9        INIT_METHOD_CALL                                         !0, 'loadHTML'
    7    10        SEND_VAL_EX                                              '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A+++++%3Chead%3E%3Ctitle%3EHello%0A+++++world%3C%2Ftitle%3E%0A%0A+++++%3Cmeta+charset%3D%22UTF-8%22%3E%0A%0A%0A%0A%0A+++++%3C%2Fhead%3E%3Cbody%3E%0A+++++++%3Cheader%3Etest%3C%2Fheader%3E%0A+++++%3C%2Fbody%3E%0A++%3C%2Fhtml%3E'
   22    11        SEND_VAL_EX                                              32
    6    12        DO_FCALL                                      0          
   23    13        INIT_METHOD_CALL                                         !0, 'saveHTML'
         14        DO_FCALL                                      0  $7      
         15        ECHO                                                     $7
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.29 ms | 998 KiB | 13 Q