3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait A{ function x() { echo 'A'; }} trait B{ function x() { echo 'B'; }} class C{ use A, B; function x() { A::x(); B::x(); echo 'C'; }}(new C)->x();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s1uB2
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                            'c'
          1        NEW                                              $0      'C'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'x'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function x

End of class A.

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

End of function x

End of class B.

Class C:
Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s1uB2
function name:  x
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_STATIC_METHOD_CALL                                  'A', 'x'
          1        DO_FCALL                                      0          
          2        INIT_STATIC_METHOD_CALL                                  'B', 'x'
          3        DO_FCALL                                      0          
          4        ECHO                                                     'C'
          5      > RETURN                                                   null

End of function x

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.41 ms | 1394 KiB | 13 Q