3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait TestTrait { public function getKernel() { } } class BaseTest { public function getKernel() { } } class Test extends BaseTest { use TestTrait; } $refl = new \ReflectionClass('Test'); var_dump($refl->getMethod('getKernel')->getPrototype()); var_dump($refl->getMethod('getKernel')->getPrototype()->getPrototype()->getPrototype()->getPrototype()->getPrototype()->getPrototype()->getPrototype()->getPrototype()->getPrototype()->getPrototype()->getPrototype());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M698X
function name:  (null)
number of ops:  42
compiled vars:  !0 = $refl
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   DECLARE_CLASS                                                'test', 'basetest'
   22     1        NEW                                                  $1      'ReflectionClass'
          2        SEND_VAL_EX                                                  'Test'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $1
   24     5        INIT_FCALL                                                   'var_dump'
          6        INIT_METHOD_CALL                                             !0, 'getMethod'
          7        SEND_VAL_EX                                                  'getKernel'
          8        DO_FCALL                                          0  $4      
          9        INIT_METHOD_CALL                                             $4, 'getPrototype'
         10        DO_FCALL                                          0  $5      
         11        SEND_VAR                                                     $5
         12        DO_ICALL                                                     
   26    13        INIT_FCALL                                                   'var_dump'
         14        INIT_METHOD_CALL                                             !0, 'getMethod'
         15        SEND_VAL_EX                                                  'getKernel'
         16        DO_FCALL                                          0  $7      
         17        INIT_METHOD_CALL                                             $7, 'getPrototype'
         18        DO_FCALL                                          0  $8      
         19        INIT_METHOD_CALL                                             $8, 'getPrototype'
         20        DO_FCALL                                          0  $9      
         21        INIT_METHOD_CALL                                             $9, 'getPrototype'
         22        DO_FCALL                                          0  $10     
         23        INIT_METHOD_CALL                                             $10, 'getPrototype'
         24        DO_FCALL                                          0  $11     
         25        INIT_METHOD_CALL                                             $11, 'getPrototype'
         26        DO_FCALL                                          0  $12     
         27        INIT_METHOD_CALL                                             $12, 'getPrototype'
         28        DO_FCALL                                          0  $13     
         29        INIT_METHOD_CALL                                             $13, 'getPrototype'
         30        DO_FCALL                                          0  $14     
         31        INIT_METHOD_CALL                                             $14, 'getPrototype'
         32        DO_FCALL                                          0  $15     
         33        INIT_METHOD_CALL                                             $15, 'getPrototype'
         34        DO_FCALL                                          0  $16     
         35        INIT_METHOD_CALL                                             $16, 'getPrototype'
         36        DO_FCALL                                          0  $17     
         37        INIT_METHOD_CALL                                             $17, 'getPrototype'
         38        DO_FCALL                                          0  $18     
         39        SEND_VAR                                                     $18
         40        DO_ICALL                                                     
         41      > RETURN                                                       1

Class TestTrait:
Function getkernel:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M698X
function name:  getKernel
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                       null

End of function getkernel

End of class TestTrait.

Class BaseTest:
Function getkernel:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M698X
function name:  getKernel
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E > > RETURN                                                       null

End of function getkernel

End of class BaseTest.

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.84 ms | 2955 KiB | 14 Q