3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Foo { } class Bar { use Foo; } class Baz { } $bar = new Bar; $baz = new Baz; var_dump($bar instanceof Foo); var_dump($baz instanceof Foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1nh28
function name:  (null)
number of ops:  16
compiled vars:  !0 = $bar, !1 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'bar'
   16     1        NEW                                              $2      'Bar'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   17     4        NEW                                              $5      'Baz'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   19     7        INIT_FCALL                                               'var_dump'
          8        INSTANCEOF                                       ~8      !0, 'Foo'
          9        SEND_VAL                                                 ~8
         10        DO_ICALL                                                 
   20    11        INIT_FCALL                                               'var_dump'
         12        INSTANCEOF                                       ~10     !1, 'Foo'
         13        SEND_VAL                                                 ~10
         14        DO_ICALL                                                 
         15      > 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:
161.21 ms | 1394 KiB | 15 Q