3v4l.org

run code in 300+ PHP versions simultaneously
<?php $header = array('test'); if (is_array($header[0]) && key_exists('class', $header[0])) { echo 'set'; } else { echo 'not set'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
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: 10
filename:       /in/nciQf
function name:  (null)
number of ops:  15
compiled vars:  !0 = $header
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        FETCH_DIM_R                                      ~2      !0, 0
          2        TYPE_CHECK                                  128  ~3      ~2
          3      > JMPZ_EX                                          ~3      ~3, ->10
          4    >   INIT_FCALL                                               'key_exists'
          5        SEND_VAL                                                 'class'
          6        FETCH_DIM_R                                      ~4      !0, 0
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                         $5      
          9        BOOL                                             ~3      $5
         10    > > JMPZ                                                     ~3, ->13
    4    11    >   ECHO                                                     'set'
         12      > JMP                                                      ->14
    7    13    >   ECHO                                                     'not+set'
    8    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.02 ms | 1394 KiB | 15 Q