3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait test{ public function __construct() { echo 'test'; } } abstract class myIntermediateClass{ use test; } class myClass extends myIntermediateClass{ public function __construct(){ echo 'myClass'; parent::__construct(); } } new myClass();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8kVtU
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'myintermediateclass'
   14     1        DECLARE_CLASS                                            'myclass', 'myintermediateclass'
   20     2        NEW                                              $0      'myClass'
          3        DO_FCALL                                      0          
          4        FREE                                                     $0
          5      > RETURN                                                   1

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

End of function __construct

End of class test.

Class myIntermediateClass: [no user functions]
Class myClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8kVtU
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ECHO                                                     'myClass'
   17     1        INIT_STATIC_METHOD_CALL                                  
          2        DO_FCALL                                      0          
   18     3      > RETURN                                                   null

End of function __construct

End of class myClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
228.5 ms | 2177 KiB | 11 Q