3v4l.org

run code in 300+ PHP versions simultaneously
<?php $jis_bytes = '1b244224221b2842'; // 'あ' in ISO-2022-JP $jis_bytes_without_esc = '1b24422422'; // 'あ' in ISO-2022-JP without escape sequence var_dump(mb_check_encoding(hex2bin($jis_bytes), 'JIS')); var_dump(mb_check_encoding(hex2bin($jis_bytes_without_esc), 'JIS')); var_dump(mb_check_encoding(hex2bin($jis_bytes_without_esc), 'ISO-2022-JP-2004')); var_dump(mb_check_encoding(hex2bin($jis_bytes_without_esc), 'ISO-2022-JP-MS')); var_dump(mb_check_encoding(hex2bin($jis_bytes_without_esc), 'CP50220')); var_dump(mb_check_encoding(hex2bin($jis_bytes_without_esc), 'CP50221')); var_dump(mb_check_encoding(hex2bin($jis_bytes_without_esc), 'CP50222')); var_dump(mb_check_encoding(hex2bin($jis_bytes_without_esc), 'ISO-2022-JP-MOBILE#KDDI'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6enim
function name:  (null)
number of ops:  83
compiled vars:  !0 = $jis_bytes, !1 = $jis_bytes_without_esc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '1b244224221b2842'
    5     1        ASSIGN                                                   !1, '1b24422422'
    6     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'mb_check_encoding'
          4        INIT_FCALL                                               'hex2bin'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        SEND_VAL                                                 'JIS'
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                                 
    7    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'mb_check_encoding'
         14        INIT_FCALL                                               'hex2bin'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $7      
         17        SEND_VAR                                                 $7
         18        SEND_VAL                                                 'JIS'
         19        DO_ICALL                                         $8      
         20        SEND_VAR                                                 $8
         21        DO_ICALL                                                 
    8    22        INIT_FCALL                                               'var_dump'
         23        INIT_FCALL                                               'mb_check_encoding'
         24        INIT_FCALL                                               'hex2bin'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $10     
         27        SEND_VAR                                                 $10
         28        SEND_VAL                                                 'ISO-2022-JP-2004'
         29        DO_ICALL                                         $11     
         30        SEND_VAR                                                 $11
         31        DO_ICALL                                                 
    9    32        INIT_FCALL                                               'var_dump'
         33        INIT_FCALL                                               'mb_check_encoding'
         34        INIT_FCALL                                               'hex2bin'
         35        SEND_VAR                                                 !1
         36        DO_ICALL                                         $13     
         37        SEND_VAR                                                 $13
         38        SEND_VAL                                                 'ISO-2022-JP-MS'
         39        DO_ICALL                                         $14     
         40        SEND_VAR                                                 $14
         41        DO_ICALL                                                 
   10    42        INIT_FCALL                                               'var_dump'
         43        INIT_FCALL                                               'mb_check_encoding'
         44        INIT_FCALL                                               'hex2bin'
         45        SEND_VAR                                                 !1
         46        DO_ICALL                                         $16     
         47        SEND_VAR                                                 $16
         48        SEND_VAL                                                 'CP50220'
         49        DO_ICALL                                         $17     
         50        SEND_VAR                                                 $17
         51        DO_ICALL                                                 
   11    52        INIT_FCALL                                               'var_dump'
         53        INIT_FCALL                                               'mb_check_encoding'
         54        INIT_FCALL                                               'hex2bin'
         55        SEND_VAR                                                 !1
         56        DO_ICALL                                         $19     
         57        SEND_VAR                                                 $19
         58        SEND_VAL                                                 'CP50221'
         59        DO_ICALL                                         $20     
         60        SEND_VAR                                                 $20
         61        DO_ICALL                                                 
   12    62        INIT_FCALL                                               'var_dump'
         63        INIT_FCALL                                               'mb_check_encoding'
         64        INIT_FCALL                                               'hex2bin'
         65        SEND_VAR                                                 !1
         66        DO_ICALL                                         $22     
         67        SEND_VAR                                                 $22
         68        SEND_VAL                                                 'CP50222'
         69        DO_ICALL                                         $23     
         70        SEND_VAR                                                 $23
         71        DO_ICALL                                                 
   13    72        INIT_FCALL                                               'var_dump'
         73        INIT_FCALL                                               'mb_check_encoding'
         74        INIT_FCALL                                               'hex2bin'
         75        SEND_VAR                                                 !1
         76        DO_ICALL                                         $25     
         77        SEND_VAR                                                 $25
         78        SEND_VAL                                                 'ISO-2022-JP-MOBILE%23KDDI'
         79        DO_ICALL                                         $26     
         80        SEND_VAR                                                 $26
         81        DO_ICALL                                                 
         82      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.92 ms | 1017 KiB | 16 Q