3v4l.org

run code in 300+ 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 = 18
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 18
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/7SKVK
function name:  (null)
number of ops:  20
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, ->18
          9    > > FE_FETCH_R                                               $7, !2, ->18
   25    10    >   INIT_FCALL                                               'preg_replace'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 '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'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $8      
         15        ECHO                                                     $8
   26    16        ECHO                                                     '%0A'
   24    17      > JMP                                                      ->9
         18    >   FE_FREE                                                  $7
   27    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.32 ms | 1395 KiB | 19 Q