3v4l.org

run code in 300+ PHP versions simultaneously
<?php $map = [ 'center' => 1, 'left' => 2, 'right' => 3 ]; if (array_key_exists($map[$align]) && isset($map[$align])) { print_r("true"); } else { print_r("false"); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/Qsdqc
function name:  (null)
number of ops:  17
compiled vars:  !0 = $map, !1 = $align
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'array_key_exists'
          2        FETCH_DIM_R                                      ~3      !0, !1
          3        SEND_VAL                                                 ~3
          4        DO_ICALL                                         $4      
          5      > JMPZ_EX                                          ~5      $4, ->8
          6    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~6      !0, !1
          7        BOOL                                             ~5      ~6
          8    > > JMPZ                                                     ~5, ->13
    9     9    >   INIT_FCALL                                               'print_r'
         10        SEND_VAL                                                 'true'
         11        DO_ICALL                                                 
         12      > JMP                                                      ->16
   11    13    >   INIT_FCALL                                               'print_r'
         14        SEND_VAL                                                 'false'
         15        DO_ICALL                                                 
   12    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.27 ms | 1395 KiB | 17 Q