3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(mb_check_encoding(hex2bin("1b284931323334351b2842"), "ISO-2022-JP")); // false is expected var_dump(mb_check_encoding(hex2bin("0e31323334350f"), "ISO-2022-JP")); // false is expected var_dump(mb_check_encoding(hex2bin("B1B2B3B4B5"), "ISO-2022-JP")); // false is expected echo "\n"; var_dump(mb_check_encoding(hex2bin("1b284931323334351b2842"), "JIS")); // true is expected var_dump(mb_check_encoding(hex2bin("0e31323334350f"), "JIS")); // true is expected var_dump(mb_check_encoding(hex2bin("B1B2B3B4B5"), "JIS")); // true is expected
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hb0lN
function name:  (null)
number of ops:  62
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'mb_check_encoding'
          2        INIT_FCALL                                               'hex2bin'
          3        SEND_VAL                                                 '1b284931323334351b2842'
          4        DO_ICALL                                         $0      
          5        SEND_VAR                                                 $0
          6        SEND_VAL                                                 'ISO-2022-JP'
          7        DO_ICALL                                         $1      
          8        SEND_VAR                                                 $1
          9        DO_ICALL                                                 
    4    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'mb_check_encoding'
         12        INIT_FCALL                                               'hex2bin'
         13        SEND_VAL                                                 '0e31323334350f'
         14        DO_ICALL                                         $3      
         15        SEND_VAR                                                 $3
         16        SEND_VAL                                                 'ISO-2022-JP'
         17        DO_ICALL                                         $4      
         18        SEND_VAR                                                 $4
         19        DO_ICALL                                                 
    5    20        INIT_FCALL                                               'var_dump'
         21        INIT_FCALL                                               'mb_check_encoding'
         22        INIT_FCALL                                               'hex2bin'
         23        SEND_VAL                                                 'B1B2B3B4B5'
         24        DO_ICALL                                         $6      
         25        SEND_VAR                                                 $6
         26        SEND_VAL                                                 'ISO-2022-JP'
         27        DO_ICALL                                         $7      
         28        SEND_VAR                                                 $7
         29        DO_ICALL                                                 
    6    30        ECHO                                                     '%0A'
    7    31        INIT_FCALL                                               'var_dump'
         32        INIT_FCALL                                               'mb_check_encoding'
         33        INIT_FCALL                                               'hex2bin'
         34        SEND_VAL                                                 '1b284931323334351b2842'
         35        DO_ICALL                                         $9      
         36        SEND_VAR                                                 $9
         37        SEND_VAL                                                 'JIS'
         38        DO_ICALL                                         $10     
         39        SEND_VAR                                                 $10
         40        DO_ICALL                                                 
    8    41        INIT_FCALL                                               'var_dump'
         42        INIT_FCALL                                               'mb_check_encoding'
         43        INIT_FCALL                                               'hex2bin'
         44        SEND_VAL                                                 '0e31323334350f'
         45        DO_ICALL                                         $12     
         46        SEND_VAR                                                 $12
         47        SEND_VAL                                                 'JIS'
         48        DO_ICALL                                         $13     
         49        SEND_VAR                                                 $13
         50        DO_ICALL                                                 
    9    51        INIT_FCALL                                               'var_dump'
         52        INIT_FCALL                                               'mb_check_encoding'
         53        INIT_FCALL                                               'hex2bin'
         54        SEND_VAL                                                 'B1B2B3B4B5'
         55        DO_ICALL                                         $15     
         56        SEND_VAR                                                 $15
         57        SEND_VAL                                                 'JIS'
         58        DO_ICALL                                         $16     
         59        SEND_VAR                                                 $16
         60        DO_ICALL                                                 
         61      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.91 ms | 1009 KiB | 16 Q