3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { public function __construct() { echo 'Hello '; } } trait SayWorld { public function __construct() { parent::__construct(); echo 'World!'; } } class MyHelloWorld extends Base { use SayWorld; } $o = new MyHelloWorld();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c8TZL
function name:  (null)
number of ops:  5
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   DECLARE_CLASS                                            'myhelloworld', 'base'
   20     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/c8TZL
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'Hello+'
    6     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/c8TZL
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        DO_FCALL                                      0          
   12     2        ECHO                                                     'World%21'
   13     3      > RETURN                                                   null

End of function __construct

End of class SayWorld.

Class MyHelloWorld: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
273.76 ms | 998 KiB | 13 Q