3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "\xC2°Freen\x18 ew°\x90ɮ\x7F"; //$result="a\xC2"; //$result = preg_replace('~[\x{0000}-\x{000F}\x{007F}-\x{00a0}]~S', '', $result); echo @iconv("UTF-8", "UTF-8//IGNORE", $result); exit; $result = preg_replace('~[\x{0000}-\x{000F}\x{007F}-\x{00a0}]~', '?', $result); $string = "°Freen\x18 ew°\x90ɮ\x7F\xc2"; $string = preg_replace("#[\x09\x0A\x0D\x20-\x7E]#" ,"",$string); // ASCII $string = preg_replace("#[\xC2-\xDF][\x80-\xBF]#" ,"",$string); // non-overlong 2-byte $string = preg_replace("#\xE0[\xA0-\xBF][\x80-\xBF]#" ,"",$string); // excluding overlongs $string = preg_replace("#[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}#","",$string); // straight 3-byte $string = preg_replace("#\xED[\x80-\x9F][\x80-\xBF]#" ,"",$string); // excluding surrogates $string = preg_replace("#\xF0[\x90-\xBF][\x80-\xBF]{2}#","",$string); // planes 1-3 $string = preg_replace("#[\xF1-\xF3][\x80-\xBF]{3}#" ,"",$string); // planes 4-15 $string = preg_replace("#\xF4[\x80-\x8F][\x80-\xBF]{2}#","",$string); // plane 16 //reject overly long 2 byte sequences, as well as characters above U+10000 and replace with ? $result= preg_replace( '/[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})/S', '', $result ); if($result == "\xC2") echo 'fuck'; echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/aKmQ2
function name:  (null)
number of ops:  76
compiled vars:  !0 = $result, !1 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%C2%C2%B0Freen%18+ew%C2%B0%90%C9%AE%7F'
    7     1        BEGIN_SILENCE                                    ~3      
          2        INIT_FCALL_BY_NAME                                       'iconv'
          3        SEND_VAL_EX                                              'UTF-8'
          4        SEND_VAL_EX                                              'UTF-8%2F%2FIGNORE'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $4      
          7        END_SILENCE                                              ~3
          8        ECHO                                                     $4
    8     9      > EXIT                                                     
    9    10*       INIT_FCALL                                               'preg_replace'
         11*       SEND_VAL                                                 '%7E%5B%5Cx%7B0000%7D-%5Cx%7B000F%7D%5Cx%7B007F%7D-%5Cx%7B00a0%7D%5D%7E'
         12*       SEND_VAL                                                 '%3F'
         13*       SEND_VAR                                                 !0
         14*       DO_ICALL                                         $5      
         15*       ASSIGN                                                   !0, $5
   13    16*       ASSIGN                                                   !1, '%C2%B0Freen%18+ew%C2%B0%90%C9%AE%7F%C2'
   14    17*       INIT_FCALL                                               'preg_replace'
         18*       SEND_VAL                                                 '%23%5B%09%0A%0D+-%7E%5D%23'
         19*       SEND_VAL                                                 ''
         20*       SEND_VAR                                                 !1
         21*       DO_ICALL                                         $8      
         22*       ASSIGN                                                   !1, $8
   15    23*       INIT_FCALL                                               'preg_replace'
         24*       SEND_VAL                                                 '%23%5B%C2-%DF%5D%5B%80-%BF%5D%23'
         25*       SEND_VAL                                                 ''
         26*       SEND_VAR                                                 !1
         27*       DO_ICALL                                         $10     
         28*       ASSIGN                                                   !1, $10
   16    29*       INIT_FCALL                                               'preg_replace'
         30*       SEND_VAL                                                 '%23%E0%5B%A0-%BF%5D%5B%80-%BF%5D%23'
         31*       SEND_VAL                                                 ''
         32*       SEND_VAR                                                 !1
         33*       DO_ICALL                                         $12     
         34*       ASSIGN                                                   !1, $12
   17    35*       INIT_FCALL                                               'preg_replace'
         36*       SEND_VAL                                                 '%23%5B%E1-%EC%EE%EF%5D%5B%80-%BF%5D%7B2%7D%23'
         37*       SEND_VAL                                                 ''
         38*       SEND_VAR                                                 !1
         39*       DO_ICALL                                         $14     
         40*       ASSIGN                                                   !1, $14
   18    41*       INIT_FCALL                                               'preg_replace'
         42*       SEND_VAL                                                 '%23%ED%5B%80-%9F%5D%5B%80-%BF%5D%23'
         43*       SEND_VAL                                                 ''
         44*       SEND_VAR                                                 !1
         45*       DO_ICALL                                         $16     
         46*       ASSIGN                                                   !1, $16
   19    47*       INIT_FCALL                                               'preg_replace'
         48*       SEND_VAL                                                 '%23%F0%5B%90-%BF%5D%5B%80-%BF%5D%7B2%7D%23'
         49*       SEND_VAL                                                 ''
         50*       SEND_VAR                                                 !1
         51*       DO_ICALL                                         $18     
         52*       ASSIGN                                                   !1, $18
   20    53*       INIT_FCALL                                               'preg_replace'
         54*       SEND_VAL                                                 '%23%5B%F1-%F3%5D%5B%80-%BF%5D%7B3%7D%23'
         55*       SEND_VAL                                                 ''
         56*       SEND_VAR                                                 !1
         57*       DO_ICALL                                         $20     
         58*       ASSIGN                                                   !1, $20
   21    59*       INIT_FCALL                                               'preg_replace'
         60*       SEND_VAL                                                 '%23%F4%5B%80-%8F%5D%5B%80-%BF%5D%7B2%7D%23'
         61*       SEND_VAL                                                 ''
         62*       SEND_VAR                                                 !1
         63*       DO_ICALL                                         $22     
         64*       ASSIGN                                                   !1, $22
   24    65*       INIT_FCALL                                               'preg_replace'
   25    66*       SEND_VAL                                                 '%2F%5B%5CxC2-%5CxDF%5D%28%28%3F%21%5B%5Cx80-%5CxBF%5D%29%7C%5B%5Cx80-%5CxBF%5D%7B2%2C%7D%29%2FS'
   26    67*       SEND_VAL                                                 ''
         68*       SEND_VAR                                                 !0
         69*       DO_ICALL                                         $24     
   24    70*       ASSIGN                                                   !0, $24
   29    71*       IS_EQUAL                                                 !0, '%C2'
         72*       JMPZ                                                     ~26, ->74
   30    73*       ECHO                                                     'fuck'
   32    74*       ECHO                                                     !0
         75*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.67 ms | 1392 KiB | 18 Q