3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Filter out the bad words function blacklist_filter($post) { $list = 'example|' .'exampletwo|' .'examplethree'; return preg_replace_callback('/\b('.$list.')\b/i', function (array $match) { return str_repeat('*', strlen($match[1])); }, $post); } echo blacklist_filter("xy EXAMPLE xy");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ofamj
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'blacklist_filter'
          1        SEND_VAL                                                 'xy+EXAMPLE+xy'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function blacklist_filter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ofamj
function name:  blacklist_filter
number of ops:  12
compiled vars:  !0 = $post, !1 = $list
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    8     1        ASSIGN                                                   !1, 'example%7Cexampletwo%7Cexamplethree'
   12     2        INIT_FCALL                                               'preg_replace_callback'
          3        CONCAT                                           ~3      '%2F%5Cb%28', !1
          4        CONCAT                                           ~4      ~3, '%29%5Cb%2Fi'
          5        SEND_VAL                                                 ~4
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fofamj%3A12%240'
   15     7        SEND_VAL                                                 ~5
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $6      
         10      > RETURN                                                   $6
   16    11*     > RETURN                                                   null

End of function blacklist_filter

Function %00%7Bclosure%7D%2Fin%2Fofamj%3A12%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ofamj
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        INIT_FCALL                                               'str_repeat'
          2        SEND_VAL                                                 '%2A'
          3        FETCH_DIM_R                                      ~1      !0, 1
          4        STRLEN                                           ~2      ~1
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                         $3      
          7      > RETURN                                                   $3
   15     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fofamj%3A12%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.68 ms | 1399 KiB | 18 Q