3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { public function __construct() { echo "BASE\n"; } } trait SayWorld { public function __construct() { echo "TRAIT\n"; parent::__construct(); } } class MyHelloWorld extends Base { use SayWorld; public function __construct() { echo "CHILD\n"; parent::__construct(); } } $o = new MyHelloWorld();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ulj9Y
function name:  (null)
number of ops:  5
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   DECLARE_CLASS                                            'myhelloworld', 'base'
   30     1        NEW                                              $1      'MyHelloWorld'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
          4      > RETURN                                                   1

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

End of function __construct

End of class Base.

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

End of function __construct

End of class SayWorld.

Class MyHelloWorld:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ulj9Y
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   ECHO                                                     'CHILD%0A'
   26     1        INIT_STATIC_METHOD_CALL                                  
          2        DO_FCALL                                      0          
   27     3      > RETURN                                                   null

End of function __construct

End of class MyHelloWorld.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
239.24 ms | 997 KiB | 13 Q