3v4l.org

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

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

End of function a

End of class A.

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

End of function b

End of class B.

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

End of function c

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.32 ms | 1395 KiB | 13 Q