3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'укгезәөшөхзәхөшк2049һһлдябчсячмииюсит.июбҗрарэ'; /* Detect character encoding with current detect_order */ echo mb_detect_encoding($str)."\n"; /* "auto" is expanded according to mbstring.language */ echo mb_detect_encoding($str, "auto")."\n"; /* Specify encoding_list character encoding by comma separated list */ echo mb_detect_encoding($str, "JIS, eucjp-win, sjis-win")."\n"; /* 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/ARMdX
function name:  (null)
number of ops:  30
compiled vars:  !0 = $str, !1 = $ary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%D1%83%D0%BA%D0%B3%D0%B5%D0%B7%D3%99%D3%A9%D1%88%D3%A9%D1%85%D0%B7%D3%99%D1%85%D3%A9%D1%88%D0%BA2049%D2%BB%D2%BB%D0%BB%D0%B4%D1%8F%D0%B1%D1%87%D1%81%D1%8F%D1%87%D0%BC%D0%B8%D0%B8%D1%8E%D1%81%D0%B8%D1%82.%D0%B8%D1%8E%D0%B1%D2%97%D1%80%D0%B0%D1%80%D1%8D'
    6     1        INIT_FCALL                                               'mb_detect_encoding'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        CONCAT                                           ~4      $3, '%0A'
          5        ECHO                                                     ~4
    9     6        INIT_FCALL                                               'mb_detect_encoding'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 'auto'
          9        DO_ICALL                                         $5      
         10        CONCAT                                           ~6      $5, '%0A'
         11        ECHO                                                     ~6
   12    12        INIT_FCALL                                               'mb_detect_encoding'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 'JIS%2C+eucjp-win%2C+sjis-win'
         15        DO_ICALL                                         $7      
         16        CONCAT                                           ~8      $7, '%0A'
         17        ECHO                                                     ~8
   15    18        ASSIGN_DIM                                               !1
         19        OP_DATA                                                  'ASCII'
   16    20        ASSIGN_DIM                                               !1
         21        OP_DATA                                                  'JIS'
   17    22        ASSIGN_DIM                                               !1
         23        OP_DATA                                                  'EUC-JP'
   18    24        INIT_FCALL                                               'mb_detect_encoding'
         25        SEND_VAR                                                 !0
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $12     
         28        ECHO                                                     $12
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.08 ms | 1396 KiB | 15 Q