3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} class Bar extends Foo {} class Baz {} $foo = new Foo; $bar = new Bar; $baz = new Baz; var_dump([ !($bar instanceof Foo), !(Bar instanceof Foo), !($baz instanceof $foo), ]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2LuN6
function name:  (null)
number of ops:  24
compiled vars:  !0 = $foo, !1 = $bar, !2 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $3      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   10     3        NEW                                              $6      'Bar'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $6
   11     6        NEW                                              $9      'Baz'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $9
   13     9        INIT_FCALL                                               'var_dump'
   14    10        INSTANCEOF                                       ~12     !1, 'Foo'
         11        BOOL_NOT                                         ~13     ~12
         12        INIT_ARRAY                                       ~14     ~13
   15    13        FETCH_CONSTANT                                   ~15     'Bar'
         14        INSTANCEOF                                       ~16     ~15, 'Foo'
         15        BOOL_NOT                                         ~17     ~16
         16        ADD_ARRAY_ELEMENT                                ~14     ~17
   16    17        FETCH_CLASS                                   0  $18     !0
         18        INSTANCEOF                                       ~19     !2, $18
         19        BOOL_NOT                                         ~20     ~19
         20        ADD_ARRAY_ELEMENT                                ~14     ~20
         21        SEND_VAL                                                 ~14
         22        DO_ICALL                                                 
   17    23      > RETURN                                                   1

Class Foo: [no user functions]
Class Bar: [no user functions]
Class Baz: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.12 ms | 1395 KiB | 15 Q