3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T { public function ttt() {} } class F { use T; public function fff() {} } $f = new F(); var_dump(get_class_methods(current(class_uses($f))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nk0ES
function name:  (null)
number of ops:  17
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'f'
   11     1        NEW                                              $1      'F'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   13     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'get_class_methods'
          6        INIT_FCALL                                               'current'
          7        INIT_FCALL                                               'class_uses'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                         $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

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

End of function ttt

End of class T.

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

End of function fff

End of class F.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.39 ms | 1395 KiB | 21 Q