3v4l.org

run code in 500+ PHP versions simultaneously
<?php error_reporting(-1); mb_internal_encoding('UTF-8'); $regexp = '/[дd]\\W*\_*[уyu]\\W*\_*[рpr]\\W*\_*[аa]\\W*[кk]/iu'; $fools = [ 'ад ку пир мира кок', 'ДуРАк', 'ты - D у р а к', 'ты ду рак', 'ты ДурАК', 'ТЫ - D У рА К', 'ты - d У Р а к', 'D|U|R|A|K', 'я д-*-У-*-R-*-a-*-K', 'ты - dУ р а к', 'd-У+R/A-K', 'DУ рА к', 'Дурaк' ]; foreach ($fools as $fool) { echo preg_replace($regexp, 'xорошый человек', $fool); echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/7SKVK
function name:  (null)
number of ops:  17
compiled vars:  !0 = $regexp, !1 = $fools, !2 = $fool
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'error_reporting'
          1        SEND_VAL                                                     -1
          2        DO_ICALL                                                     
    4     3        INIT_FCALL                                                   'mb_internal_encoding'
          4        SEND_VAL                                                     'UTF-8'
          5        DO_ICALL                                                     
    6     6        ASSIGN                                                       !0, '%2F%5B%D0%B4d%5D%5CW%2A%5C_%2A%5B%D1%83yu%5D%5CW%2A%5C_%2A%5B%D1%80pr%5D%5CW%2A%5C_%2A%5B%D0%B0a%5D%5CW%2A%5B%D0%BAk%5D%2Fiu'
    8     7        ASSIGN                                                       !1, <array>
   24     8      > FE_RESET_R                                           $7      !1, ->15
          9    > > FE_FETCH_R                                                   $7, !2, ->15
   25    10    >   FRAMELESS_ICALL_3                preg_replace        ~8      !0, 'x%D0%BE%D1%80%D0%BE%D1%88%D1%8B%D0%B9+%D1%87%D0%B5%D0%BB%D0%BE%D0%B2%D0%B5%D0%BA'
         11        OP_DATA                                                      !2
         12        ECHO                                                         ~8
   26    13        ECHO                                                         '%0A'
   24    14      > JMP                                                          ->9
         15    >   FE_FREE                                                      $7
   27    16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
175.01 ms | 2137 KiB | 17 Q