3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A {} class B implements A {} class C {} var_dump(in_array(A::class, class_implements(A::class))); var_dump(in_array(A::class, class_implements(B::class))); var_dump(in_array(A::class, class_implements(C::class)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VdIbR
function name:  (null)
number of ops:  32
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                            'b'
    7     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'in_array'
          3        SEND_VAL                                                 'A'
          4        INIT_FCALL                                               'class_implements'
          5        SEND_VAL                                                 'A'
          6        DO_ICALL                                         $0      
          7        SEND_VAR                                                 $0
          8        DO_ICALL                                         $1      
          9        SEND_VAR                                                 $1
         10        DO_ICALL                                                 
    8    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'in_array'
         13        SEND_VAL                                                 'A'
         14        INIT_FCALL                                               'class_implements'
         15        SEND_VAL                                                 'B'
         16        DO_ICALL                                         $3      
         17        SEND_VAR                                                 $3
         18        DO_ICALL                                         $4      
         19        SEND_VAR                                                 $4
         20        DO_ICALL                                                 
    9    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'in_array'
         23        SEND_VAL                                                 'A'
         24        INIT_FCALL                                               'class_implements'
         25        SEND_VAL                                                 'C'
         26        DO_ICALL                                         $6      
         27        SEND_VAR                                                 $6
         28        DO_ICALL                                         $7      
         29        SEND_VAR                                                 $7
         30        DO_ICALL                                                 
         31      > 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.59 ms | 1407 KiB | 19 Q