3v4l.org

run code in 300+ PHP versions simultaneously
<?php global $user_login, $current_user; $user_info = array( 'nothing', 'even more nothing' ); $roles = array ( 'administrator', 'subscriber', ); if (array_intersect( $roles, $user_info)) { echo 'success'; } else { echo 'failure'; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V4Hf2
function name:  (null)
number of ops:  13
compiled vars:  !0 = $user_login, !1 = $current_user, !2 = $user_info, !3 = $roles
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   BIND_GLOBAL                                              !0, 'user_login'
          1        BIND_GLOBAL                                              !1, 'current_user'
    3     2        ASSIGN                                                   !2, <array>
    7     3        ASSIGN                                                   !3, <array>
   12     4        INIT_FCALL                                               'array_intersect'
          5        SEND_VAR                                                 !3
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $6      
          8      > JMPZ                                                     $6, ->11
   14     9    >   ECHO                                                     'success'
   12    10      > JMP                                                      ->12
   18    11    >   ECHO                                                     'failure'
   21    12    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.13 ms | 1435 KiB | 14 Q