3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allowed_chars = 'a\-z 0\-9~%\.\:_\-'; $str = 'renewal'; if ( ! preg_match("/^[".preg_quote($allowed_chars)."]+$/i", $str)){ echo "Unallowed!!!!"; }else{ echo "Looks fine"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KTL7E
function name:  (null)
number of ops:  17
compiled vars:  !0 = $allowed_chars, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'a%5C-z+0%5C-9%7E%25%5C.%5C%3A_%5C-'
    3     1        ASSIGN                                                   !1, 'renewal'
    4     2        INIT_FCALL                                               'preg_match'
          3        INIT_FCALL                                               'preg_quote'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        CONCAT                                           ~5      '%2F%5E%5B', $4
          7        CONCAT                                           ~6      ~5, '%5D%2B%24%2Fi'
          8        SEND_VAL                                                 ~6
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $7      
         11        BOOL_NOT                                         ~8      $7
         12      > JMPZ                                                     ~8, ->15
    5    13    >   ECHO                                                     'Unallowed%21%21%21%21'
         14      > JMP                                                      ->16
    7    15    >   ECHO                                                     'Looks+fine'
    8    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.74 ms | 1395 KiB | 17 Q