3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [ <!ENTITY xxe SYSTEM "file:///etc/passwd" > ]> <html><p>&xxe;</p></html>'; $doc = new DOMDocument; $doc->loadHTML($xml, LIBXML_NOENT); echo $doc->saveXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7eTTZ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $xml, !1 = $doc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%21DOCTYPE+html+PUBLIC%0A%22-%2F%2FW3C%2F%2FDTD+XHTML+1.0+Transitional%2F%2FEN%22%0A%22http%3A%2F%2Fwww.w3.org%2FTR%2Fxhtml1%2FDTD%2Fxhtml1-transitional.dtd%22%0A%5B%0A++%3C%21ENTITY+xxe+SYSTEM+%22file%3A%2F%2F%2Fetc%2Fpasswd%22+%3E%0A%5D%3E%0A%3Chtml%3E%3Cp%3E%26xxe%3B%3C%2Fp%3E%3C%2Fhtml%3E'
   11     1        NEW                                              $3      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   12     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAL_EX                                              2
          7        DO_FCALL                                      0          
   13     8        INIT_METHOD_CALL                                         !1, 'saveXML'
          9        DO_FCALL                                      0  $7      
         10        ECHO                                                     $7
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.84 ms | 1393 KiB | 13 Q