3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allgroups = array( 'grupp1', 'grupp2', 'grupp3', 'grupp4', 'grupp5' ); $membership = array( 'grupp1', 'grupp5' ); foreach($allgroups as $tmp) { if(empty( array_intersect( array($tmp),$membership) )){ var_dump('user inte medlem i {$tmp}\n'); } else { var_dump('user är medlem i {$tmp}\n'); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
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 = 3
Branch analysis from position: 3
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/OLR55
function name:  (null)
number of ops:  21
compiled vars:  !0 = $allgroups, !1 = $membership, !2 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   13     2      > FE_RESET_R                                       $5      !0, ->19
          3    > > FE_FETCH_R                                               $5, !2, ->19
   15     4    >   INIT_FCALL                                               'array_intersect'
          5        INIT_ARRAY                                       ~6      !2
          6        SEND_VAL                                                 ~6
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $7      
          9        BOOL_NOT                                         ~8      $7
         10      > JMPZ                                                     ~8, ->15
   16    11    >   INIT_FCALL                                               'var_dump'
         12        SEND_VAL                                                 'user+inte+medlem+i+%7B%24tmp%7D%5Cn'
         13        DO_ICALL                                                 
         14      > JMP                                                      ->18
   19    15    >   INIT_FCALL                                               'var_dump'
         16        SEND_VAL                                                 'user+%C3%A4r+medlem+i+%7B%24tmp%7D%5Cn'
         17        DO_ICALL                                                 
   13    18    > > JMP                                                      ->3
         19    >   FE_FREE                                                  $5
   21    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.1 ms | 1395 KiB | 17 Q