3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait A { public function smallTalk() { echo 'a'; } public function bigTalk() { echo 'A'; } } trait B { public function smallTalk() { echo 'b'; } public function bigTalk() { echo 'B'; } } class Talker { use A, B { B::smallTalk insteadof A; A::bigTalk insteadof B; } } class Aliased_Talker { use A, B { B::smallTalk insteadof A; A::bigTalk insteadof B; B::bigTalk as talk; } } (new Aliased_Talker)->bigTalk();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T64tY
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   DECLARE_CLASS                                            'talker'
   27     1        DECLARE_CLASS                                            'aliased_talker'
   34     2        NEW                                              $0      'Aliased_Talker'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $0, 'bigTalk'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function smalltalk

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

End of function bigtalk

End of class A.

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

End of function smalltalk

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

End of function bigtalk

End of class B.

Class Talker: [no user functions]
Class Aliased_Talker: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.7 ms | 1386 KiB | 13 Q