3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-7"> <title>test</title> </head> <body><p>aaaaa' . chr(0xAE) . chr(0xE3) . chr(0x80) . chr(0x90) .chr(0xE8) . 'zzzzz</p></body> </html>'; $content = utf8_encode( $str ); $xml = new DOMDocument(); @$xml->loadHTML($content); echo $xml->saveHTML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C1s0I
function name:  (null)
number of ops:  17
compiled vars:  !0 = $str, !1 = $content, !2 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%21DOCTYPE+HTML+PUBLIC+%22-%2F%2FW3C%2F%2FDTD+HTML+4.01%2F%2FEN%22+%22http%3A%2F%2Fwww.w3.org%2FTR%2Fhtml4%2Fstrict.dtd%22%3E%0A%3Chtml%3E%0A%3Chead%3E%0A%3Cmeta+http-equiv%3D%22content-type%22+content%3D%22text%2Fhtml%3B+charset%3Diso-8859-7%22%3E%0A%3Ctitle%3Etest%3C%2Ftitle%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%3Cp%3Eaaaaa%AE%E3%80%90%E8zzzzz%3C%2Fp%3E%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   14     1        INIT_FCALL                                               'utf8_encode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   15     5        NEW                                              $6      'DOMDocument'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !2, $6
   16     8        BEGIN_SILENCE                                    ~9      
          9        INIT_METHOD_CALL                                         !2, 'loadHTML'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
         12        END_SILENCE                                              ~9
   17    13        INIT_METHOD_CALL                                         !2, 'saveHTML'
         14        DO_FCALL                                      0  $11     
         15        ECHO                                                     $11
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.42 ms | 1399 KiB | 15 Q