3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('display_errors', true); error_reporting(E_ALL); abstract class papa { public function papa() { var_dump(__CLASS__ . '-' . __FUNCTION__); } } class son extends papa { public function son() { var_dump(__CLASS__ . '-' . __FUNCTION__); parent::__construct(); } } abstract class mama { public function __construct() { var_dump(__CLASS__ . '-' . __FUNCTION__); } public function mama() { var_dump(__CLASS__ . '-' . __FUNCTION__); } } class daughter1 extends mama { public function daughter() { var_dump(__CLASS__ . '-' . __FUNCTION__); parent::__construct(); } } class daughter2 extends mama { public function daughter() { var_dump(__CLASS__ . '-' . __FUNCTION__); parent::mama(); } } var_dump('DAUGHTER-__construct'); $girl1 = new daughter1(); var_dump('DAUGHTER-mama'); $girl2 = new daughter2(); var_dump('SON'); $boy = new son();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIkbe
function name:  (null)
number of ops:  26
compiled vars:  !0 = $girl1, !1 = $girl2, !2 = $boy
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'display_errors'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'error_reporting'
          5        SEND_VAL                                                 32767
          6        DO_ICALL                                                 
   43     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAL                                                 'DAUGHTER-__construct'
          9        DO_ICALL                                                 
   44    10        NEW                                              $6      'daughter1'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !0, $6
   45    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAL                                                 'DAUGHTER-mama'
         15        DO_ICALL                                                 
   46    16        NEW                                              $10     'daughter2'
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !1, $10
   47    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAL                                                 'SON'
         21        DO_ICALL                                                 
   48    22        NEW                                              $14     'son'
         23        DO_FCALL                                      0          
         24        ASSIGN                                                   !2, $14
         25      > RETURN                                                   1

Class papa:
Function papa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIkbe
function name:  papa
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'papa-papa'
          2        DO_ICALL                                                 
    9     3      > RETURN                                                   null

End of function papa

End of class papa.

Class son:
Function son:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIkbe
function name:  son
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'son-son'
          2        DO_ICALL                                                 
   15     3        INIT_STATIC_METHOD_CALL                                  
          4        DO_FCALL                                      0          
   16     5      > RETURN                                                   null

End of function son

Function papa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIkbe
function name:  papa
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'papa-papa'
          2        DO_ICALL                                                 
    9     3      > RETURN                                                   null

End of function papa

End of class son.

Class mama:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIkbe
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'mama-__construct'
          2        DO_ICALL                                                 
   22     3      > RETURN                                                   null

End of function __construct

Function mama:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIkbe
function name:  mama
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'mama-mama'
          2        DO_ICALL                                                 
   26     3      > RETURN                                                   null

End of function mama

End of class mama.

Class daughter1:
Function daughter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIkbe
function name:  daughter
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'daughter1-daughter'
          2        DO_ICALL                                                 
   32     3        INIT_STATIC_METHOD_CALL                                  
          4        DO_FCALL                                      0          
   33     5      > RETURN                                                   null

End of function daughter

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIkbe
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'mama-__construct'
          2        DO_ICALL                                                 
   22     3      > RETURN                                                   null

End of function __construct

Function mama:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIkbe
function name:  mama
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'mama-mama'
          2        DO_ICALL                                                 
   26     3      > RETURN                                                   null

End of function mama

End of class daughter1.

Class daughter2:
Function daughter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIkbe
function name:  daughter
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'daughter2-daughter'
          2        DO_ICALL                                                 
   39     3        INIT_STATIC_METHOD_CALL                                  'mama'
          4        DO_FCALL                                      0          
   40     5      > RETURN                                                   null

End of function daughter

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIkbe
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'mama-__construct'
          2        DO_ICALL                                                 
   22     3      > RETURN                                                   null

End of function __construct

Function mama:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIkbe
function name:  mama
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'mama-mama'
          2        DO_ICALL                                                 
   26     3      > RETURN                                                   null

End of function mama

End of class daughter2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.14 ms | 1396 KiB | 19 Q