3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <div>hello</div> <div>world</div> HTML; $doc = new DOMDocument; $doc->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); echo $doc->saveHTML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t0hm6
function name:  (null)
number of ops:  12
compiled vars:  !0 = $html, !1 = $doc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cdiv%3Ehello%3C%2Fdiv%3E%0A%3Cdiv%3Eworld%3C%2Fdiv%3E'
    8     1        NEW                                              $3      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
    9     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAL_EX                                              8196
          7        DO_FCALL                                      0          
   10     8        INIT_METHOD_CALL                                         !1, 'saveHTML'
          9        DO_FCALL                                      0  $7      
         10        ECHO                                                     $7
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.9 ms | 1408 KiB | 13 Q