3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = [ "Lincoln Crown", "Crown Court", "go holiday", "house fire", "John Hinton", "Hinton Jailed" ]; $output = []; $blacklist = []; foreach ($input as $string) { $words = explode(' ', $string); foreach ($words as $word) { if (in_array($word, $blacklist)) { continue 2; } } array_push($blacklist, ...$words); $output[] = $string; } var_export($blacklist); echo "\n"; var_export($output);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 29
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 29
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 20
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 20
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/8rQ33
function name:  (null)
number of ops:  38
compiled vars:  !0 = $input, !1 = $output, !2 = $blacklist, !3 = $string, !4 = $words, !5 = $word
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, <array>
   12     2        ASSIGN                                                   !2, <array>
   13     3      > FE_RESET_R                                       $9      !0, ->29
          4    > > FE_FETCH_R                                               $9, !3, ->29
   14     5    >   INIT_FCALL                                               'explode'
          6        SEND_VAL                                                 '+'
          7        SEND_VAR                                                 !3
          8        DO_ICALL                                         $10     
          9        ASSIGN                                                   !4, $10
   15    10      > FE_RESET_R                                       $12     !4, ->20
         11    > > FE_FETCH_R                                               $12, !5, ->20
   16    12    >   INIT_FCALL                                               'in_array'
         13        SEND_VAR                                                 !5
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $13     
         16      > JMPZ                                                     $13, ->19
   17    17    >   FE_FREE                                                  $12
         18      > JMP                                                      ->4
   15    19    > > JMP                                                      ->11
         20    >   FE_FREE                                                  $12
   20    21        INIT_FCALL                                               'array_push'
         22        SEND_REF                                                 !2
         23        SEND_UNPACK                                              !4
         24        CHECK_UNDEF_ARGS                                         
         25        DO_ICALL                                                 
   21    26        ASSIGN_DIM                                               !1
         27        OP_DATA                                                  !3
   13    28      > JMP                                                      ->4
         29    >   FE_FREE                                                  $9
   23    30        INIT_FCALL                                               'var_export'
         31        SEND_VAR                                                 !2
         32        DO_ICALL                                                 
   24    33        ECHO                                                     '%0A'
   25    34        INIT_FCALL                                               'var_export'
         35        SEND_VAR                                                 !1
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.29 ms | 1006 KiB | 17 Q