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(is_a($bar, 'Foo')); var_dump($baz instanceof Foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DHDlN
function name:  (null)
number of ops:  19
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        INIT_FCALL                                               'is_a'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 'Foo'
         11        DO_ICALL                                         $8      
         12        SEND_VAR                                                 $8
         13        DO_ICALL                                                 
   20    14        INIT_FCALL                                               'var_dump'
         15        INSTANCEOF                                       ~10     !1, 'Foo'
         16        SEND_VAL                                                 ~10
         17        DO_ICALL                                                 
         18      > 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:
148.98 ms | 1394 KiB | 17 Q