3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface MyInterface { } class MyClass implements MyInterface { } $a = new MyClass; $b = new MyClass; $c = 'MyClass'; $d = 'NotMyClass'; var_dump($a instanceof $b); // $b is an object of class MyClass var_dump($a instanceof $c); // $c is a string 'MyClass' var_dump($a instanceof $d); // $d is a string 'NotMyClass'
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7hLea
function name:  (null)
number of ops:  25
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'myclass'
   10     1        NEW                                              $4      'MyClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
   11     4        NEW                                              $7      'MyClass'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $7
   12     7        ASSIGN                                                   !2, 'MyClass'
   13     8        ASSIGN                                                   !3, 'NotMyClass'
   15     9        INIT_FCALL                                               'var_dump'
         10        FETCH_CLASS                                   0  $12     !1
         11        INSTANCEOF                                       ~13     !0, $12
         12        SEND_VAL                                                 ~13
         13        DO_ICALL                                                 
   16    14        INIT_FCALL                                               'var_dump'
         15        FETCH_CLASS                                   0  $15     !2
         16        INSTANCEOF                                       ~16     !0, $15
         17        SEND_VAL                                                 ~16
         18        DO_ICALL                                                 
   17    19        INIT_FCALL                                               'var_dump'
         20        FETCH_CLASS                                   0  $18     !3
         21        INSTANCEOF                                       ~19     !0, $18
         22        SEND_VAL                                                 ~19
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Class MyInterface: [no user functions]
Class MyClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.85 ms | 1395 KiB | 15 Q