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) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/74rhj
function name:  (null)
number of ops:  38
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
         36        DO_ICALL                                                 
   18    37      > 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:
154.1 ms | 1396 KiB | 19 Q