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'); var_dump($value); 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($value);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 25, Position 2 = 30
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 35
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
Branch analysis from position: 30
filename:       /in/UnAnI
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
   10    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
   12    16        INIT_FCALL                                               'mb_strlen'
         17        SEND_VAR                                                 !0
         18        SEND_VAL                                                 'UTF-8'
         19        DO_ICALL                                         $9      
         20        INIT_FCALL                                               'mb_strlen'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                         $10     
         23        IS_SMALLER                                       ~11     $9, $10
         24      > JMPNZ_EX                                         ~11     ~11, ->30
         25    >   INIT_FCALL                                               'preg_match'
         26        SEND_VAL                                                 '%7C%5B%5E%5Cx09%5Cx0A%5Cx0D%5Cx20-%5CxD77F%5CxE000-%5CxFFFD%5D%7Ce'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $12     
         29        BOOL                                             ~11     $12
         30    > > JMPZ                                                     ~11, ->35
   15    31    >   INIT_FCALL                                               'base64_encode'
         32        SEND_VAR                                                 !1
         33        DO_ICALL                                         $13     
         34        ASSIGN                                                   !0, $13
   18    35    >   INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !0
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.24 ms | 1396 KiB | 27 Q