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'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QpOQY
function name:  (null)
number of ops:  33
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                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.65 ms | 1084 KiB | 16 Q