3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface GrandparentInterface {} interface ParentInterface extends GrandparentInterface {} class X implements ParentInterface {} var_dump(is_subclass_of('X', 'ParentInterface')); var_dump(is_subclass_of('X', 'GrandparentInterface'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BAb0f
function name:  (null)
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'parentinterface'
    5     1        DECLARE_CLASS                                            'x'
    7     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'is_subclass_of'
          4        SEND_VAL                                                 'X'
          5        SEND_VAL                                                 'ParentInterface'
          6        DO_ICALL                                         $0      
          7        SEND_VAR                                                 $0
          8        DO_ICALL                                                 
    8     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'is_subclass_of'
         11        SEND_VAL                                                 'X'
         12        SEND_VAL                                                 'GrandparentInterface'
         13        DO_ICALL                                         $2      
         14        SEND_VAR                                                 $2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Class GrandparentInterface: [no user functions]
Class ParentInterface: [no user functions]
Class X: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.75 ms | 1386 KiB | 17 Q