3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Config { protected function SetConfig() {} } trait Logger { use Config; protected function SetLogger() {} } class Foo { use Logger, Config; public function __construct() {} } new Foo;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CnDgf
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'logger'
   12     1        DECLARE_CLASS                                            'foo'
   18     2        NEW                                              $0      'Foo'
          3        DO_FCALL                                      0          
          4        FREE                                                     $0
          5      > RETURN                                                   1

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

End of function setconfig

End of class Config.

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

End of function setlogger

End of class Logger.

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

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.34 ms | 1394 KiB | 13 Q