3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait TestTrait {} class Test { use TestTrait; } $t = new Test; $class = 'Test'; echo ($t instanceof $class) ? "Is Test" : "Is not Test";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gSsec
function name:  (null)
number of ops:  13
compiled vars:  !0 = $t, !1 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                            'test'
    8     1        NEW                                              $2      'Test'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   10     4        ASSIGN                                                   !1, 'Test'
   12     5        FETCH_CLASS                                   0  $6      !1
          6        INSTANCEOF                                               !0, $6
          7      > JMPZ                                                     ~7, ->10
          8    >   QM_ASSIGN                                        ~8      'Is+Test'
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~8      'Is+not+Test'
         11    >   ECHO                                                     ~8
         12      > RETURN                                                   1

Class TestTrait: [no user functions]
Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.53 ms | 938 KiB | 14 Q