3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bad = ['fook', 'shoot']; $pattern = '/(?:\b(?=(?:' . implode('|', $bad) . ')\b)\w\K|\G(?!^))\w/i'; echo preg_replace($pattern, '*', 'Holy fook n shoot, Batman; The Joker\'s shooting The Riddler!');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TmB3g
function name:  (null)
number of ops:  15
compiled vars:  !0 = $bad, !1 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%7C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        CONCAT                                           ~4      '%2F%28%3F%3A%5Cb%28%3F%3D%28%3F%3A', $3
          6        CONCAT                                           ~5      ~4, '%29%5Cb%29%5Cw%5CK%7C%5CG%28%3F%21%5E%29%29%5Cw%2Fi'
          7        ASSIGN                                                   !1, ~5
    6     8        INIT_FCALL                                               'preg_replace'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 '%2A'
         11        SEND_VAL                                                 'Holy+fook+n+shoot%2C+Batman%3B+The+Joker%27s+shooting+The+Riddler%21'
         12        DO_ICALL                                         $7      
         13        ECHO                                                     $7
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.94 ms | 1398 KiB | 17 Q