3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I { const I = 'I'; } class A implements I { const A = 'A'; public function __construct() {} } class B extends A { const B = 'B'; } $r = new \ReflectionClass('B'); var_dump($r->getConstructor('I'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LCevE
function name:  (null)
number of ops:  13
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'a'
   15     1        DECLARE_CLASS                                            'b', 'a'
   20     2        NEW                                              $1      'ReflectionClass'
          3        SEND_VAL_EX                                              'B'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   21     6        INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !0, 'getConstructor'
          8        SEND_VAL_EX                                              'I'
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class I: [no user functions]
Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LCevE
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   null

End of function __construct

End of class A.

Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.59 ms | 940 KiB | 16 Q