3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T1 { protected function aa() { echo 123; } } trait T2 { use T1 { aa as public; } } class A { use T1; } class B extends A { use T2; } $b = new B(); $b->aa();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tti7T
function name:  (null)
number of ops:  9
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            't2'
   15     1        DECLARE_CLASS                                            'a'
   20     2        DECLARE_CLASS                                            'b', 'a'
   25     3        NEW                                              $1      'B'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   26     6        INIT_METHOD_CALL                                         !0, 'aa'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function aa

End of class T1.

Class T2: [no user functions]
Class A: [no user functions]
Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.73 ms | 1393 KiB | 13 Q