3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = quoted_printable_decode('Piotr Iksi=F1ski'); echo mb_check_encoding($test, 'UTF-8') ? "valid:" : "invalid:"; echo mb_detect_encoding($test, 'ASCII,UTF-8', true) ?: 'false';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TUqZ1
function name:  (null)
number of ops:  22
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'quoted_printable_decode'
          1        SEND_VAL                                                 'Piotr+Iksi%3DF1ski'
          2        DO_ICALL                                         $1      
          3        ASSIGN                                                   !0, $1
    4     4        INIT_FCALL                                               'mb_check_encoding'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'UTF-8'
          7        DO_ICALL                                         $3      
          8      > JMPZ                                                     $3, ->11
          9    >   QM_ASSIGN                                        ~4      'valid%3A'
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~4      'invalid%3A'
         12    >   ECHO                                                     ~4
    5    13        INIT_FCALL                                               'mb_detect_encoding'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 'ASCII%2CUTF-8'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $5      
         18        JMP_SET                                          ~6      $5, ->20
         19        QM_ASSIGN                                        ~6      'false'
         20        ECHO                                                     ~6
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.12 ms | 1395 KiB | 19 Q