3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait TTT{ private function baz(){} } class AAA{ use TTT; } class BBB extends AAA{ } $RC = new ReflectionClass(BBB::CLASS); var_dump($RC->getMethods(ReflectionMethod::IS_PRIVATE));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sSUph
function name:  (null)
number of ops:  13
compiled vars:  !0 = $RC
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'aaa'
   11     1        DECLARE_CLASS                                            'bbb', 'aaa'
   15     2        NEW                                              $1      'ReflectionClass'
          3        SEND_VAL_EX                                              'BBB'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   16     6        INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !0, 'getMethods'
          8        SEND_VAL_EX                                              4
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function baz

End of class TTT.

Class AAA: [no user functions]
Class BBB: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.98 ms | 997 KiB | 14 Q