3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo preg_replace('/[^\w~!$^().-]+/u', '', 'login;№н гин4123').PHP_EOL; // А теперь все вхождения if (preg_match_all('/[^\w~!$^().-]+/u', 'login;№н гин4123', $matches)) { var_dump($matches[0]); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/8dJli
function name:  (null)
number of ops:  15
compiled vars:  !0 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   FRAMELESS_ICALL_3                preg_replace        ~1      '%2F%5B%5E%5Cw%7E%21%24%5E%28%29.-%5D%2B%2Fu', ''
          1        OP_DATA                                                      'login%3B%E2%84%96%D0%BD+%D0%B3%D0%B8%D0%BD4123'
          2        CONCAT                                               ~2      ~1, '%0A'
          3        ECHO                                                         ~2
    5     4        INIT_FCALL                                                   'preg_match_all'
          5        SEND_VAL                                                     '%2F%5B%5E%5Cw%7E%21%24%5E%28%29.-%5D%2B%2Fu'
          6        SEND_VAL                                                     'login%3B%E2%84%96%D0%BD+%D0%B3%D0%B8%D0%BD4123'
          7        SEND_REF                                                     !0
          8        DO_ICALL                                             $3      
          9      > JMPZ                                                         $3, ->14
    6    10    >   INIT_FCALL                                                   'var_dump'
         11        FETCH_DIM_R                                          ~4      !0, 0
         12        SEND_VAL                                                     ~4
         13        DO_ICALL                                                     
    7    14    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
154.21 ms | 1542 KiB | 10 Q