3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A {} $a = new A; $classA = 'A'; $classB = 'B'; echo intval($a instanceof $classA); echo intval($a instanceof $classB);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KguI5
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $classA, !2 = $classB
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    4     3        ASSIGN                                                   !1, 'A'
    5     4        ASSIGN                                                   !2, 'B'
    6     5        FETCH_CLASS                                   0  $8      !1
          6        INSTANCEOF                                       ~9      !0, $8
          7        CAST                                          4  ~10     ~9
          8        ECHO                                                     ~10
    7     9        FETCH_CLASS                                   0  $11     !2
         10        INSTANCEOF                                       ~12     !0, $11
         11        CAST                                          4  ~13     ~12
         12        ECHO                                                     ~13
         13      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.23 ms | 1393 KiB | 13 Q