3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Detect character encoding with current detect_order */ echo mb_detect_encoding($str); /* "auto" is expanded according to mbstring.language */ echo mb_detect_encoding($str, "auto"); /* Specify encoding_list character encoding by comma separated list */ echo mb_detect_encoding($str, "JIS, eucjp-win, sjis-win"); /* Use array to specify encoding_list */ $ary[] = "ASCII"; $ary[] = "JIS"; $ary[] = "EUC-JP"; echo mb_detect_encoding($str, $ary);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tSZUu
function name:  (null)
number of ops:  26
compiled vars:  !0 = $str, !1 = $ary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'mb_detect_encoding'
          1        SEND_VAR                                                 !0
          2        DO_ICALL                                         $2      
          3        ECHO                                                     $2
    7     4        INIT_FCALL                                               'mb_detect_encoding'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'auto'
          7        DO_ICALL                                         $3      
          8        ECHO                                                     $3
   10     9        INIT_FCALL                                               'mb_detect_encoding'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 'JIS%2C+eucjp-win%2C+sjis-win'
         12        DO_ICALL                                         $4      
         13        ECHO                                                     $4
   13    14        ASSIGN_DIM                                               !1
         15        OP_DATA                                                  'ASCII'
   14    16        ASSIGN_DIM                                               !1
         17        OP_DATA                                                  'JIS'
   15    18        ASSIGN_DIM                                               !1
         19        OP_DATA                                                  'EUC-JP'
   16    20        INIT_FCALL                                               'mb_detect_encoding'
         21        SEND_VAR                                                 !0
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                         $8      
         24        ECHO                                                     $8
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.4 ms | 1395 KiB | 15 Q