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(class_uses($f)[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UvWni
function name:  (null)
number of ops:  12
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                                               'class_uses'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        FETCH_DIM_R                                      ~5      $4, 0
          9        SEND_VAL                                                 ~5
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class T:
Function ttt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UvWni
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/UvWni
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:
152.46 ms | 1395 KiB | 17 Q