3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T1 { public function __construct(){ echo "t1 trait"; parent::__construct(); } } trait T2 { public function __construct(){ echo "t2 trait"; parent::__construct(); } } class Test { use T1, T2; public function __construct(){ echo "test class"; } } $t = new Test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LoLkX
function name:  (null)
number of ops:  5
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   DECLARE_CLASS                                            'test'
   31     1        NEW                                              $1      'Test'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
          4      > RETURN                                                   1

Class T1:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LoLkX
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     't1+trait'
    7     1        INIT_STATIC_METHOD_CALL                                  
          2        DO_FCALL                                      0          
    8     3      > RETURN                                                   null

End of function __construct

End of class T1.

Class T2:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LoLkX
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     't2+trait'
   16     1        INIT_STATIC_METHOD_CALL                                  
          2        DO_FCALL                                      0          
   17     3      > RETURN                                                   null

End of function __construct

End of class T2.

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

End of function __construct

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.73 ms | 1394 KiB | 13 Q