3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait TA { function foo() {} } trait TB { function foo() {} } trait TC { function foo() {} } class C { use TA, TB, TC { TB::foo insteadof TA; } } $c = new C; $c->foo(); $c->bar(); $c->baz();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IXr7l
function name:  (null)
number of ops:  11
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   DECLARE_CLASS                                            'c'
   21     1        NEW                                              $1      'C'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   22     4        INIT_METHOD_CALL                                         !0, 'foo'
          5        DO_FCALL                                      0          
   23     6        INIT_METHOD_CALL                                         !0, 'bar'
          7        DO_FCALL                                      0          
   24     8        INIT_METHOD_CALL                                         !0, 'baz'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

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

End of function foo

End of class TA.

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

End of function foo

End of class TB.

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

End of function foo

End of class TC.

Class C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.86 ms | 1385 KiB | 13 Q