3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T1 { public function func() { echo "From T1\n"; } } trait T2 { public function func() { echo "From T2\n"; } } class Bar { public function func() { echo "From Bar\n"; } use T1, T2 { func as renamedFunc; } } $b = new Bar(); $b->renamedFunc();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6h3PM
function name:  (null)
number of ops:  7
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   DECLARE_CLASS                                            'bar'
   24     1        NEW                                              $1      'Bar'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   25     4        INIT_METHOD_CALL                                         !0, 'renamedFunc'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function func

End of class T1.

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

End of function func

End of class T2.

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

End of function func

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.6 ms | 995 KiB | 13 Q