3v4l.org

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

Class I1: [no user functions]
Class I2: [no user functions]
Class E1: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.36 ms | 1395 KiB | 15 Q