3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A {} class B implements A {} class C extends B {} $b = new B; var_dump(is_a($b, 'A')); $c = new C; var_dump(is_a($c, 'A')); var_dump(is_a($c, 'B')); var_dump(is_a($c, 'C')); var_dump(is_a('C', 'A', true)); var_dump(is_a('C', 'B', true)); var_dump(is_a('C', 'C', true));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uGVt8
function name:  (null)
number of ops:  61
compiled vars:  !0 = $b, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                            'b'
    5     1        DECLARE_CLASS                                            'c', 'b'
    7     2        NEW                                              $2      'B'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
    8     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'is_a'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 'A'
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                                 
   10    12        NEW                                              $7      'C'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !1, $7
   11    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'is_a'
         17        SEND_VAR                                                 !1
         18        SEND_VAL                                                 'A'
         19        DO_ICALL                                         $10     
         20        SEND_VAR                                                 $10
         21        DO_ICALL                                                 
   12    22        INIT_FCALL                                               'var_dump'
         23        INIT_FCALL                                               'is_a'
         24        SEND_VAR                                                 !1
         25        SEND_VAL                                                 'B'
         26        DO_ICALL                                         $12     
         27        SEND_VAR                                                 $12
         28        DO_ICALL                                                 
   13    29        INIT_FCALL                                               'var_dump'
         30        INIT_FCALL                                               'is_a'
         31        SEND_VAR                                                 !1
         32        SEND_VAL                                                 'C'
         33        DO_ICALL                                         $14     
         34        SEND_VAR                                                 $14
         35        DO_ICALL                                                 
   14    36        INIT_FCALL                                               'var_dump'
         37        INIT_FCALL                                               'is_a'
         38        SEND_VAL                                                 'C'
         39        SEND_VAL                                                 'A'
         40        SEND_VAL                                                 <true>
         41        DO_ICALL                                         $16     
         42        SEND_VAR                                                 $16
         43        DO_ICALL                                                 
   15    44        INIT_FCALL                                               'var_dump'
         45        INIT_FCALL                                               'is_a'
         46        SEND_VAL                                                 'C'
         47        SEND_VAL                                                 'B'
         48        SEND_VAL                                                 <true>
         49        DO_ICALL                                         $18     
         50        SEND_VAR                                                 $18
         51        DO_ICALL                                                 
   16    52        INIT_FCALL                                               'var_dump'
         53        INIT_FCALL                                               'is_a'
         54        SEND_VAL                                                 'C'
         55        SEND_VAL                                                 'C'
         56        SEND_VAL                                                 <true>
         57        DO_ICALL                                         $20     
         58        SEND_VAR                                                 $20
         59        DO_ICALL                                                 
         60      > RETURN                                                   1

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.54 ms | 1400 KiB | 17 Q