3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait TOne { public function foo() { // abstract methods are not considered for conflict echo 'Test'; } } trait TTwo { public function Foo() { echo 'Test2'; } } class Bar { use TOne, TTwo; } $a = new Bar(); $a->foo(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/57JGJ
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   DECLARE_CLASS                                            'bar'
   18     1        NEW                                              $1      'Bar'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   19     4        INIT_METHOD_CALL                                         !0, 'foo'
          5        DO_FCALL                                      0          
   20     6      > RETURN                                                   1

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

End of function foo

End of class TOne.

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

End of function foo

End of class TTwo.

Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.59 ms | 1393 KiB | 13 Q