3v4l.org

run code in 300+ PHP versions simultaneously
<?php mb_internal_encoding('UTF-8'); $value = 'g' . chr(0xa4) .'eld'; $orignalValue = $value; mb_substitute_character('entity'); $value = mb_convert_encoding($value, 'UTF-8'); if (mb_strlen($value, 'UTF-8') < mb_strlen($orignalValue) || preg_match('|[^\x09\x0A\x0D\x20-\xD77F\xE000-\xFFFD]|e', $value)) { // value not ISO-8859-15 or UTF8 $value = base64_encode($orignalValue); } var_dump(mb_detect_order(), $value);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 22, Position 2 = 27
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
Branch analysis from position: 27
filename:       /in/jPgQt
function name:  (null)
number of ops:  39
compiled vars:  !0 = $value, !1 = $orignalValue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'mb_internal_encoding'
          1        SEND_VAL                                                 'UTF-8'
          2        DO_ICALL                                                 
    5     3        ASSIGN                                                   !0, 'g%A4eld'
    6     4        ASSIGN                                                   !1, !0
    7     5        INIT_FCALL                                               'mb_substitute_character'
          6        SEND_VAL                                                 'entity'
          7        DO_ICALL                                                 
    9     8        INIT_FCALL                                               'mb_convert_encoding'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 'UTF-8'
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !0, $6
   11    13        INIT_FCALL                                               'mb_strlen'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 'UTF-8'
         16        DO_ICALL                                         $8      
         17        INIT_FCALL                                               'mb_strlen'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $9      
         20        IS_SMALLER                                       ~10     $8, $9
         21      > JMPNZ_EX                                         ~10     ~10, ->27
         22    >   INIT_FCALL                                               'preg_match'
         23        SEND_VAL                                                 '%7C%5B%5E%5Cx09%5Cx0A%5Cx0D%5Cx20-%5CxD77F%5CxE000-%5CxFFFD%5D%7Ce'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                         $11     
         26        BOOL                                             ~10     $11
         27    > > JMPZ                                                     ~10, ->32
   14    28    >   INIT_FCALL                                               'base64_encode'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $12     
         31        ASSIGN                                                   !0, $12
   17    32    >   INIT_FCALL                                               'var_dump'
         33        INIT_FCALL                                               'mb_detect_order'
         34        DO_ICALL                                         $14     
         35        SEND_VAR                                                 $14
         36        SEND_VAR                                                 !0
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.25 ms | 1396 KiB | 29 Q