3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set("error_reporting", -1 & ~E_DEPRECATED); set_error_handler(function($s, $m, $f, $l, $c = null) { print "PHP Warning: $m in " . basename($f) . " on line $l"; }, E_WARNING); $xml = base64_decode("PGRpdj48cD7M4OzgIOz76+Ag8ODs8y48L3A+PC9kaXY+"); $xml2 = " <!DOCTYPE html> <html> <head> <meta charset='Windows-1251'> </head> <body> $xml; </body> </html> "; $options = LIBXML_HTML_NOIMPLIED | LIBXML_NOENT | LIBXML_NONET | LIBXML_NOWARNING | LIBXML_NOXMLDECL | LIBXML_HTML_NODEFDTD ; ob_start(function($str, $phase) { return iconv("Windows-1251", "UTF-8", $str); }); //print "--- CP1251 ---\n$xml\n"; //print "Direct:"; $doc = new DOMDocument; //$doc->encoding = "Windows-1251"; $doc->loadHTML($xml2, $options); print $doc->saveXML(null, LIBXML_NOENT);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EBpNS
function name:  (null)
number of ops:  35
compiled vars:  !0 = $xml, !1 = $xml2, !2 = $options, !3 = $doc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'error_reporting'
          2        SEND_VAL                                                 -8193
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'set_error_handler'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FEBpNS%3A4%240'
          6        SEND_VAL                                                 ~5
          7        SEND_VAL                                                 2
          8        DO_ICALL                                                 
    6     9        INIT_FCALL                                               'base64_decode'
         10        SEND_VAL                                                 'PGRpdj48cD7M4OzgIOz76%2BAg8ODs8y48L3A%2BPC9kaXY%2B'
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !0, $7
    8    13        ROPE_INIT                                     3  ~10     '%0A%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A++%3Chead%3E%0A%09%3Cmeta+charset%3D%27Windows-1251%27%3E%0A++%3C%2Fhead%3E%0A++%3Cbody%3E%0A++++'
   15    14        ROPE_ADD                                      1  ~10     ~10, !0
         15        ROPE_END                                      2  ~9      ~10, '%3B%0A++%3C%2Fbody%3E%0A%3C%2Fhtml%3E%0A'
    8    16        ASSIGN                                                   !1, ~9
   20    17        ASSIGN                                                   !2, 10310
   28    18        INIT_FCALL                                               'ob_start'
         19        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FEBpNS%3A28%241'
   31    20        SEND_VAL                                                 ~14
         21        DO_ICALL                                                 
   37    22        NEW                                              $16     'DOMDocument'
         23        DO_FCALL                                      0          
         24        ASSIGN                                                   !3, $16
   39    25        INIT_METHOD_CALL                                         !3, 'loadHTML'
         26        SEND_VAR_EX                                              !1
         27        SEND_VAR_EX                                              !2
         28        DO_FCALL                                      0          
   40    29        INIT_METHOD_CALL                                         !3, 'saveXML'
         30        SEND_VAL_EX                                              null
         31        SEND_VAL_EX                                              2
         32        DO_FCALL                                      0  $20     
         33        ECHO                                                     $20
         34      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FEBpNS%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EBpNS
function name:  {closure}
number of ops:  17
compiled vars:  !0 = $s, !1 = $m, !2 = $f, !3 = $l, !4 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV_INIT                                        !4      null
          5        ROPE_INIT                                     3  ~6      'PHP+Warning%3A++'
          6        ROPE_ADD                                      1  ~6      ~6, !1
          7        ROPE_END                                      2  ~5      ~6, '+in+'
          8        INIT_FCALL                                               'basename'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $8      
         11        CONCAT                                           ~9      ~5, $8
         12        NOP                                                      
         13        FAST_CONCAT                                      ~10     '+on+line+', !3
         14        CONCAT                                           ~11     ~9, ~10
         15        ECHO                                                     ~11
         16      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FEBpNS%3A4%240

Function %00%7Bclosure%7D%2Fin%2FEBpNS%3A28%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EBpNS
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $str, !1 = $phase
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   30     2        INIT_FCALL_BY_NAME                                       'iconv'
          3        SEND_VAL_EX                                              'Windows-1251'
          4        SEND_VAL_EX                                              'UTF-8'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $2      
          7      > RETURN                                                   $2
   31     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FEBpNS%3A28%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.85 ms | 1400 KiB | 23 Q