3v4l.org

run code in 500+ PHP versions simultaneously
<?php $variable[1] = ['A' => 'n', 'X' => 'n']; $variable[2] = ['A' => 'n', 'X' => 'Y']; $variable[3] = ['A' => 'B', 'X' => 'n']; $test = 'B'; $test2 = 'Y'; If(in_array($test, array_column($variable, "A"))){ Echo $test . " Found in A"; }Else if(in_array($test2, array_column($variable, "X"))){ Echo $test2 . " Found in B"; }else{ Echo "none found"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 26
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dv7Yp
function name:  (null)
number of ops:  28
compiled vars:  !0 = $variable, !1 = $test, !2 = $test2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                                   !0, 1
          1        OP_DATA                                                      <array>
    4     2        ASSIGN_DIM                                                   !0, 2
          3        OP_DATA                                                      <array>
    5     4        ASSIGN_DIM                                                   !0, 3
          5        OP_DATA                                                      <array>
    7     6        ASSIGN                                                       !1, 'B'
    8     7        ASSIGN                                                       !2, 'Y'
   10     8        INIT_FCALL                                                   'array_column'
          9        SEND_VAR                                                     !0
         10        SEND_VAL                                                     'A'
         11        DO_ICALL                                             $8      
         12        FRAMELESS_ICALL_2                in_array            ~9      !1, $8
         13      > JMPZ                                                         ~9, ->17
   11    14    >   CONCAT                                               ~10     !1, '+Found+in+A'
         15        ECHO                                                         ~10
   10    16      > JMP                                                          ->27
   12    17    >   INIT_FCALL                                                   'array_column'
         18        SEND_VAR                                                     !0
         19        SEND_VAL                                                     'X'
         20        DO_ICALL                                             $11     
         21        FRAMELESS_ICALL_2                in_array            ~12     !2, $11
         22      > JMPZ                                                         ~12, ->26
   13    23    >   CONCAT                                               ~13     !2, '+Found+in+B'
         24        ECHO                                                         ~13
   12    25      > JMP                                                          ->27
   15    26    >   ECHO                                                         'none+found'
   16    27    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.92 ms | 2238 KiB | 14 Q