3v4l.org

run code in 300+ PHP versions simultaneously
<?php $entries = array( "111 222 465", "666 123 412", "000 999", ); $test = array(111, 465, 555, 666, 777); foreach ($entries as $key => $etry) { $plotsTotal1 = explode(' ', $entry); $plotsTotal2 = array_filter($plotsTotal1); $matches = array_intersect($test, $plotsTotal2); if (count($matches) > 0) { echo 'Entry ' . $key. ' contains ' . implode(',', $matches) . '<br/>'; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 32
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 32
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 31
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 31
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/mAQTt
function name:  (null)
number of ops:  34
compiled vars:  !0 = $entries, !1 = $test, !2 = $etry, !3 = $key, !4 = $plotsTotal1, !5 = $entry, !6 = $plotsTotal2, !7 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   10     2      > FE_RESET_R                                       $10     !0, ->32
          3    > > FE_FETCH_R                                       ~11     $10, !2, ->32
          4    >   ASSIGN                                                   !3, ~11
   11     5        INIT_FCALL                                               'explode'
          6        SEND_VAL                                                 '+'
          7        SEND_VAR                                                 !5
          8        DO_ICALL                                         $13     
          9        ASSIGN                                                   !4, $13
   12    10        INIT_FCALL                                               'array_filter'
         11        SEND_VAR                                                 !4
         12        DO_ICALL                                         $15     
         13        ASSIGN                                                   !6, $15
   14    14        INIT_FCALL                                               'array_intersect'
         15        SEND_VAR                                                 !1
         16        SEND_VAR                                                 !6
         17        DO_ICALL                                         $17     
         18        ASSIGN                                                   !7, $17
   16    19        COUNT                                            ~19     !7
         20        IS_SMALLER                                               0, ~19
         21      > JMPZ                                                     ~20, ->31
   17    22    >   CONCAT                                           ~21     'Entry+', !3
         23        CONCAT                                           ~22     ~21, '+contains+'
         24        INIT_FCALL                                               'implode'
         25        SEND_VAL                                                 '%2C'
         26        SEND_VAR                                                 !7
         27        DO_ICALL                                         $23     
         28        CONCAT                                           ~24     ~22, $23
         29        CONCAT                                           ~25     ~24, '%3Cbr%2F%3E'
         30        ECHO                                                     ~25
   10    31    > > JMP                                                      ->3
         32    >   FE_FREE                                                  $10
   19    33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.26 ms | 1396 KiB | 21 Q