3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Thing { } class Foo implements Thing { } class Bar extends Foo { } class Zulu { } var_dump( is_subclass_of('Foo', 'Thing'), is_a('Foo', 'Thing'), is_subclass_of('Bar', 'Thing'), is_a('Bar', 'Thing'), is_subclass_of('Zulu', 'Thing'), is_a('Zulu', 'Thing') );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vuD2q
function name:  (null)
number of ops:  35
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                            'foo'
    6     1        DECLARE_CLASS                                            'bar', 'foo'
   11     2        INIT_FCALL                                               'var_dump'
   12     3        INIT_FCALL                                               'is_subclass_of'
          4        SEND_VAL                                                 'Foo'
          5        SEND_VAL                                                 'Thing'
          6        DO_ICALL                                         $0      
          7        SEND_VAR                                                 $0
   13     8        INIT_FCALL                                               'is_a'
          9        SEND_VAL                                                 'Foo'
         10        SEND_VAL                                                 'Thing'
         11        DO_ICALL                                         $1      
         12        SEND_VAR                                                 $1
   14    13        INIT_FCALL                                               'is_subclass_of'
         14        SEND_VAL                                                 'Bar'
         15        SEND_VAL                                                 'Thing'
         16        DO_ICALL                                         $2      
         17        SEND_VAR                                                 $2
   15    18        INIT_FCALL                                               'is_a'
         19        SEND_VAL                                                 'Bar'
         20        SEND_VAL                                                 'Thing'
         21        DO_ICALL                                         $3      
         22        SEND_VAR                                                 $3
   16    23        INIT_FCALL                                               'is_subclass_of'
         24        SEND_VAL                                                 'Zulu'
         25        SEND_VAL                                                 'Thing'
         26        DO_ICALL                                         $4      
         27        SEND_VAR                                                 $4
   17    28        INIT_FCALL                                               'is_a'
         29        SEND_VAL                                                 'Zulu'
         30        SEND_VAL                                                 'Thing'
         31        DO_ICALL                                         $5      
         32        SEND_VAR                                                 $5
         33        DO_ICALL                                                 
   18    34      > RETURN                                                   1

Class Thing: [no user functions]
Class Foo: [no user functions]
Class Bar: [no user functions]
Class Zulu: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.33 ms | 1396 KiB | 19 Q