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', TRUE), is_subclass_of('Bar', 'Thing'), is_a('Bar', 'Thing', TRUE), is_subclass_of('Zulu', 'Thing'), is_a('Zulu', 'Thing', TRUE), is_subclass_of('Foo', 'Foo'), is_a('Foo', 'Foo', TRUE) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6N7UM
function name:  (null)
number of ops:  49
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        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $1      
         13        SEND_VAR                                                 $1
   14    14        INIT_FCALL                                               'is_subclass_of'
         15        SEND_VAL                                                 'Bar'
         16        SEND_VAL                                                 'Thing'
         17        DO_ICALL                                         $2      
         18        SEND_VAR                                                 $2
   15    19        INIT_FCALL                                               'is_a'
         20        SEND_VAL                                                 'Bar'
         21        SEND_VAL                                                 'Thing'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $3      
         24        SEND_VAR                                                 $3
   16    25        INIT_FCALL                                               'is_subclass_of'
         26        SEND_VAL                                                 'Zulu'
         27        SEND_VAL                                                 'Thing'
         28        DO_ICALL                                         $4      
         29        SEND_VAR                                                 $4
   17    30        INIT_FCALL                                               'is_a'
         31        SEND_VAL                                                 'Zulu'
         32        SEND_VAL                                                 'Thing'
         33        SEND_VAL                                                 <true>
         34        DO_ICALL                                         $5      
         35        SEND_VAR                                                 $5
   18    36        INIT_FCALL                                               'is_subclass_of'
         37        SEND_VAL                                                 'Foo'
         38        SEND_VAL                                                 'Foo'
         39        DO_ICALL                                         $6      
         40        SEND_VAR                                                 $6
   19    41        INIT_FCALL                                               'is_a'
         42        SEND_VAL                                                 'Foo'
         43        SEND_VAL                                                 'Foo'
         44        SEND_VAL                                                 <true>
         45        DO_ICALL                                         $7      
         46        SEND_VAR                                                 $7
         47        DO_ICALL                                                 
   20    48      > 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:
156.96 ms | 1400 KiB | 19 Q