3v4l.org

run code in 300+ PHP versions simultaneously
<?php $badthings = [ "`", "<", ">", "()"]; $input="Ciao< come va?'"; foreach ($badthings as $key => $badthing) { if((int)strpos($input, $badthing) > -1){ str_replace($badthing, "", $input); } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 17
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/DY8pG
function name:  (null)
number of ops:  20
compiled vars:  !0 = $badthings, !1 = $input, !2 = $badthing, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 'Ciao%3C+come+va%3F%27'
    5     2      > FE_RESET_R                                       $6      !0, ->18
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->18
          4    >   ASSIGN                                                   !3, ~7
    6     5        INIT_FCALL                                               'strpos'
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                         $9      
          9        CAST                                          4  ~10     $9
         10        IS_SMALLER                                               -1, ~10
         11      > JMPZ                                                     ~11, ->17
    7    12    >   INIT_FCALL                                               'str_replace'
         13        SEND_VAR                                                 !2
         14        SEND_VAL                                                 ''
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
    5    17    > > JMP                                                      ->3
         18    >   FE_FREE                                                  $6
   12    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.73 ms | 1395 KiB | 17 Q