3v4l.org

run code in 300+ PHP versions simultaneously
<?php class inject{ public function __construct(){ echo 'I say'; } } class say extends inject{ public function init(){ echo ' hello '; $this->otherFunction(); } public function otherFunction(){ parent::__construct(); echo ' world '; } } $output = new say(); echo $output->init();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZVoZW
function name:  (null)
number of ops:  7
compiled vars:  !0 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'say'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'init'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
          6      > RETURN                                                   1

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

End of function __construct

End of class inject.

Class say:
Function init:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZVoZW
function name:  init
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     '+hello+'
   10     1        INIT_METHOD_CALL                                         'otherFunction'
          2        DO_FCALL                                      0          
   11     3      > RETURN                                                   null

End of function init

Function otherfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZVoZW
function name:  otherFunction
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        DO_FCALL                                      0          
   14     2        ECHO                                                     '+world+'
   15     3      > RETURN                                                   null

End of function otherfunction

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

End of function __construct

End of class say.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.01 ms | 1068 KiB | 13 Q