3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ["abc", "def", "ghi"]; $excludeKeyword_arr = ["ab", "de"]; foreach ($array as $index => $haystack) { foreach ($excludeKeyword_arr as $needle) { if (strpos($haystack, $needle) !== false) { unset($array[$index]); break; } } } var_export(array_values($array));
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 = 77) Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 16
Branch analysis from position: 16
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/bYp2m
function name:  (null)
number of ops:  26
compiled vars:  !0 = $array, !1 = $excludeKeyword_arr, !2 = $haystack, !3 = $index, !4 = $needle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2      > FE_RESET_R                                       $7      !0, ->18
          3    > > FE_FETCH_R                                       ~8      $7, !2, ->18
          4    >   ASSIGN                                                   !3, ~8
    7     5      > FE_RESET_R                                       $10     !1, ->16
          6    > > FE_FETCH_R                                               $10, !4, ->16
    8     7    >   INIT_FCALL                                               'strpos'
          8        SEND_VAR                                                 !2
          9        SEND_VAR                                                 !4
         10        DO_ICALL                                         $11     
         11        TYPE_CHECK                                  1018          $11
         12      > JMPZ                                                     ~12, ->15
    9    13    >   UNSET_DIM                                                !0, !3
   10    14      > JMP                                                      ->16
    7    15    > > JMP                                                      ->6
         16    >   FE_FREE                                                  $10
    6    17      > JMP                                                      ->3
         18    >   FE_FREE                                                  $7
   14    19        INIT_FCALL                                               'var_export'
         20        INIT_FCALL                                               'array_values'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $13     
         23        SEND_VAR                                                 $13
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.25 ms | 1429 KiB | 16 Q