3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.8 ms | 1396 KiB | 23 Q