3v4l.org

run code in 300+ PHP versions simultaneously
<?php class aTest{} class bTest{} $x = new bTest(); if (! $x instanceof aTest) echo 'not a'; else echo 'a'; if (! $x instanceof bTest) echo 'not b'; else echo 'b';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
Branch analysis from position: 14
filename:       /in/GoqWA
function name:  (null)
number of ops:  16
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $1      'bTest'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    8     3        INSTANCEOF                                       ~4      !0, 'aTest'
          4        BOOL_NOT                                         ~5      ~4
          5      > JMPZ                                                     ~5, ->8
          6    >   ECHO                                                     'not+a'
          7      > JMP                                                      ->9
          8    >   ECHO                                                     'a'
    9     9    >   INSTANCEOF                                       ~6      !0, 'bTest'
         10        BOOL_NOT                                         ~7      ~6
         11      > JMPZ                                                     ~7, ->14
         12    >   ECHO                                                     'not+b'
         13      > JMP                                                      ->15
         14    >   ECHO                                                     'b'
         15    > > RETURN                                                   1

Class aTest: [no user functions]
Class bTest: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.39 ms | 1385 KiB | 13 Q