3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Something { public $class; } $header = [new Something]; if ($header[0] instanceof Something) { echo $header[0]->class; } else { echo 'not set'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
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/iii6l
function name:  (null)
number of ops:  13
compiled vars:  !0 = $header
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $1      'Something'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~3      $1
          3        ASSIGN                                                   !0, ~3
    8     4        FETCH_DIM_R                                      ~5      !0, 0
          5        INSTANCEOF                                               ~5, 'Something'
          6      > JMPZ                                                     ~6, ->11
    9     7    >   FETCH_DIM_R                                      ~7      !0, 0
          8        FETCH_OBJ_R                                      ~8      ~7, 'class'
          9        ECHO                                                     ~8
         10      > JMP                                                      ->12
   12    11    >   ECHO                                                     'not+set'
   13    12    > > RETURN                                                   1

Class Something: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.86 ms | 1392 KiB | 13 Q