3v4l.org

run code in 300+ PHP versions simultaneously
<?php $char = chr(200); echo 'ASCII: ', mb_check_encoding($char, 'ASCII') ? 'yup' : 'nope', PHP_EOL; echo 'ISO-8859-1: ', mb_check_encoding($char, 'ISO-8859-1') ? 'yup' : 'nope', PHP_EOL; echo 'UTF-8: ', mb_check_encoding($char, 'UTF-8') ? 'yup' : 'nope', PHP_EOL;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
Branch analysis from position: 31
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
Branch analysis from position: 20
filename:       /in/Rh5J3
function name:  (null)
number of ops:  35
compiled vars:  !0 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%C8'
    5     1        ECHO                                                     'ASCII%3A+'
          2        INIT_FCALL                                               'mb_check_encoding'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'ASCII'
          5        DO_ICALL                                         $2      
          6      > JMPZ                                                     $2, ->9
          7    >   QM_ASSIGN                                        ~3      'yup'
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~3      'nope'
         10    >   ECHO                                                     ~3
         11        ECHO                                                     '%0A'
    6    12        ECHO                                                     'ISO-8859-1%3A+'
         13        INIT_FCALL                                               'mb_check_encoding'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 'ISO-8859-1'
         16        DO_ICALL                                         $4      
         17      > JMPZ                                                     $4, ->20
         18    >   QM_ASSIGN                                        ~5      'yup'
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~5      'nope'
         21    >   ECHO                                                     ~5
         22        ECHO                                                     '%0A'
    7    23        ECHO                                                     'UTF-8%3A+'
         24        INIT_FCALL                                               'mb_check_encoding'
         25        SEND_VAR                                                 !0
         26        SEND_VAL                                                 'UTF-8'
         27        DO_ICALL                                         $6      
         28      > JMPZ                                                     $6, ->31
         29    >   QM_ASSIGN                                        ~7      'yup'
         30      > JMP                                                      ->32
         31    >   QM_ASSIGN                                        ~7      'nope'
         32    >   ECHO                                                     ~7
         33        ECHO                                                     '%0A'
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.46 ms | 1392 KiB | 15 Q