3v4l.org

run code in 500+ PHP versions simultaneously
<?php $role = 2; $role_id = array (array('role_id' => 2 ), array('role_id' => 1 ) ); if (in_array($role, array_column($role_id, 'role_id'))) { echo "Match found"; } else { echo "Match not found"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b3eEJ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $role, !1 = $role_id
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 2
    4     1        ASSIGN                                                       !1, <array>
    5     2        INIT_FCALL                                                   'array_column'
          3        SEND_VAR                                                     !1
          4        SEND_VAL                                                     'role_id'
          5        DO_ICALL                                             $4      
          6        FRAMELESS_ICALL_2                in_array            ~5      !0, $4
          7      > JMPZ                                                         ~5, ->10
    6     8    >   ECHO                                                         'Match+found'
    5     9      > JMP                                                          ->11
    9    10    >   ECHO                                                         'Match+not+found'
   10    11    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
215.34 ms | 2078 KiB | 14 Q