3v4l.org

run code in 300+ PHP versions simultaneously
<?php $plotsOpenSpace2 = '111 222 333'; $plotsShell2 = '555 222 444'; $plotsOther2 = '000 999 666'; $entries = array($plotsOpenSpace2, $plotsShell2, $plotsOther2); $test = array(111, 222, 465, 555, 666, 777); foreach ($entries as $key => $entry) { $matches = array_intersect($test, $entry); if (count($matches) > 0) { $i ++; echo 'test'; } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 22
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 22
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 21
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/HqCqa
function name:  (null)
number of ops:  24
compiled vars:  !0 = $plotsOpenSpace2, !1 = $plotsShell2, !2 = $plotsOther2, !3 = $entries, !4 = $test, !5 = $entry, !6 = $key, !7 = $matches, !8 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '111+222+333'
    3     1        ASSIGN                                                   !1, '555+222+444'
    4     2        ASSIGN                                                   !2, '000+999+666'
    6     3        INIT_ARRAY                                       ~12     !0
          4        ADD_ARRAY_ELEMENT                                ~12     !1
          5        ADD_ARRAY_ELEMENT                                ~12     !2
          6        ASSIGN                                                   !3, ~12
    7     7        ASSIGN                                                   !4, <array>
    9     8      > FE_RESET_R                                       $15     !3, ->22
          9    > > FE_FETCH_R                                       ~16     $15, !5, ->22
         10    >   ASSIGN                                                   !6, ~16
   11    11        INIT_FCALL                                               'array_intersect'
         12        SEND_VAR                                                 !4
         13        SEND_VAR                                                 !5
         14        DO_ICALL                                         $18     
         15        ASSIGN                                                   !7, $18
   13    16        COUNT                                            ~20     !7
         17        IS_SMALLER                                               0, ~20
         18      > JMPZ                                                     ~21, ->21
   14    19    >   PRE_INC                                                  !8
   15    20        ECHO                                                     'test'
    9    21    > > JMP                                                      ->9
         22    >   FE_FREE                                                  $15
   18    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.52 ms | 1395 KiB | 15 Q