3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allgroups = array( 'grupp1', 'grupp2', 'grupp3', 'grupp4', 'grupp5' ); $membership = array( 'grupp1', 'grupp5' ); var_dump(in_array($membership[1], $allgroups)); foreach($allgroups as $tmp) { if(empty( array_intersect( array($tmp),$membership) )){ var_dump("user inte medlem i {$tmp}"); } else { var_dump("user är medlem i {$tmp}"); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 31
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 31
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/hAvrm
function name:  (null)
number of ops:  33
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>
   14     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'in_array'
          4        FETCH_DIM_R                                      ~5      !1, 1
          5        SEND_VAL                                                 ~5
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8        SEND_VAR                                                 $6
          9        DO_ICALL                                                 
   15    10      > FE_RESET_R                                       $8      !0, ->31
         11    > > FE_FETCH_R                                               $8, !2, ->31
   17    12    >   INIT_FCALL                                               'array_intersect'
         13        INIT_ARRAY                                       ~9      !2
         14        SEND_VAL                                                 ~9
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $10     
         17        BOOL_NOT                                         ~11     $10
         18      > JMPZ                                                     ~11, ->25
   18    19    >   INIT_FCALL                                               'var_dump'
         20        NOP                                                      
         21        FAST_CONCAT                                      ~12     'user+inte+medlem+i+', !2
         22        SEND_VAL                                                 ~12
         23        DO_ICALL                                                 
         24      > JMP                                                      ->30
   21    25    >   INIT_FCALL                                               'var_dump'
         26        NOP                                                      
         27        FAST_CONCAT                                      ~14     'user+%C3%A4r+medlem+i+', !2
         28        SEND_VAL                                                 ~14
         29        DO_ICALL                                                 
   15    30    > > JMP                                                      ->11
         31    >   FE_FREE                                                  $8
   23    32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.04 ms | 1396 KiB | 19 Q