3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<EOD <html> <p> <a href="http://google.com/?q=あいうえお" title="<'あいうえお'>">"&"<br> </html> EOD; $html = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'); $dom = new DOMDocument(); @$dom->loadHTML($html); $html = $dom->saveHTML(); echo $html; exit;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/8pTXi
function name:  (null)
number of ops:  21
compiled vars:  !0 = $html, !1 = $dom
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Chtml%3E%0A%3Cp%3E%0A%3Ca+href%3D%22http%3A%2F%2Fgoogle.com%2F%3Fq%3D%E3%81%82%E3%81%84%E3%81%86%E3%81%88%E3%81%8A%22+title%3D%22%3C%27%E3%81%82%E3%81%84%E3%81%86%E3%81%88%E3%81%8A%27%3E%22%3E%22%26%22%3Cbr%3E%0A%3C%2Fhtml%3E'
    8     1        INIT_FCALL                                               'mb_convert_encoding'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'HTML-ENTITIES'
          4        SEND_VAL                                                 'UTF-8'
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !0, $3
    9     7        NEW                                              $5      'DOMDocument'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $5
   10    10        BEGIN_SILENCE                                    ~8      
         11        INIT_METHOD_CALL                                         !1, 'loadHTML'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0          
         14        END_SILENCE                                              ~8
   11    15        INIT_METHOD_CALL                                         !1, 'saveHTML'
         16        DO_FCALL                                      0  $10     
         17        ASSIGN                                                   !0, $10
   12    18        ECHO                                                     !0
   13    19      > EXIT                                                     
         20*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.23 ms | 1386 KiB | 15 Q