3v4l.org

run code in 300+ PHP versions simultaneously
<?php $latin1 = base64_decode('UXVhbmQgSWxzIEF2YWllbnQgTW9uIMJnZSAtIDQwIEFucyBEZXZhbnQgTGEgVOls6SAoRXQgQXV0b3VyLi4uKQ'); $fp = fopen('php://memory', 'rb+'); fwrite($fp, $latin1); fseek($fp, 0); //$fp = fopen('compress.zlib://effiliation_BOOKS.csv.gz', 'rb'); stream_filter_prepend($fp, 'convert.iconv.ISO-8859-1/UTF-8', STREAM_FILTER_READ); /* while (! feof($fp)) { $line = fgets($fp, 64 * 1024); if (! mb_check_encoding($line, 'UTF-8')) { echo $line; } } */ $utf8 = stream_get_contents($fp); fclose($fp); echo mb_check_encoding($utf8, 'UTF-8');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5ad86
function name:  (null)
number of ops:  35
compiled vars:  !0 = $latin1, !1 = $fp, !2 = $utf8
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'base64_decode'
          1        SEND_VAL                                                 'UXVhbmQgSWxzIEF2YWllbnQgTW9uIMJnZSAtIDQwIEFucyBEZXZhbnQgTGEgVOls6SAoRXQgQXV0b3VyLi4uKQ'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    4     4        INIT_FCALL                                               'fopen'
          5        SEND_VAL                                                 'php%3A%2F%2Fmemory'
          6        SEND_VAL                                                 'rb%2B'
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
    5     9        INIT_FCALL                                               'fwrite'
         10        SEND_VAR                                                 !1
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
    6    13        INIT_FCALL                                               'fseek'
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 0
         16        DO_ICALL                                                 
    9    17        INIT_FCALL                                               'stream_filter_prepend'
         18        SEND_VAR                                                 !1
         19        SEND_VAL                                                 'convert.iconv.ISO-8859-1%2FUTF-8'
         20        SEND_VAL                                                 1
         21        DO_ICALL                                                 
   18    22        INIT_FCALL                                               'stream_get_contents'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                         $10     
         25        ASSIGN                                                   !2, $10
   19    26        INIT_FCALL                                               'fclose'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                                 
   21    29        INIT_FCALL                                               'mb_check_encoding'
         30        SEND_VAR                                                 !2
         31        SEND_VAL                                                 'UTF-8'
         32        DO_ICALL                                         $13     
         33        ECHO                                                     $13
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.62 ms | 1396 KiB | 29 Q