3v4l.org

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

Class A: [no user functions]
Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.11 ms | 1396 KiB | 19 Q