3v4l.org

run code in 300+ PHP versions simultaneously
<?php $badWords = array('cao', 'pala', 'temp'); $str = "cao isso pala só temp que pala vai temp aparecer temp aqui cao"; $return = array_unique( explode( ' ', $str ) ); for ( $i = 0; $i < count( $badWords ); $i++ ) if( in_array( $badWords[$i] , $return ) ) echo 'Yes matched -> ' . $badWords[$i];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 12
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 12
Branch analysis from position: 25
Branch analysis from position: 12
Branch analysis from position: 21
filename:       /in/cSOM0
function name:  (null)
number of ops:  26
compiled vars:  !0 = $badWords, !1 = $str, !2 = $return, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 'cao+isso+pala+s%C3%B3+temp+que+pala+vai+temp+aparecer+temp+aqui+cao'
    5     2        INIT_FCALL                                               'array_unique'
          3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '+'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $6      
          7        SEND_VAR                                                 $6
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
    7    10        ASSIGN                                                   !3, 0
         11      > JMP                                                      ->22
    8    12    >   INIT_FCALL                                               'in_array'
         13        FETCH_DIM_R                                      ~10     !0, !3
         14        SEND_VAL                                                 ~10
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $11     
         17      > JMPZ                                                     $11, ->21
    9    18    >   FETCH_DIM_R                                      ~12     !0, !3
         19        CONCAT                                           ~13     'Yes+matched+-%3E+', ~12
         20        ECHO                                                     ~13
    7    21    >   PRE_INC                                                  !3
         22    >   COUNT                                            ~15     !0
         23        IS_SMALLER                                               !3, ~15
         24      > JMPNZ                                                    ~16, ->12
    9    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.59 ms | 1396 KiB | 19 Q