3v4l.org

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

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

End of function t

End of class a.

Class b: [no user functions]
Class c: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.6 ms | 1393 KiB | 13 Q