3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { public function __construct() { $this->get(new StdClass); } private function get(StdClass $foo) { var_dump("Base"); } } class Child1 extends Base { public function get() { var_dump("Child"); } } class Child2 extends Base { public function __construct() { $this->get(); } public function get() { var_dump("Child"); } } new Base(); new Child1(); new Child2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rk7sS
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $0      'Base'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
   30     3        NEW                                              $2      'Child1'
          4        DO_FCALL                                      0          
          5        FREE                                                     $2
   31     6        NEW                                              $4      'Child2'
          7        DO_FCALL                                      0          
          8        FREE                                                     $4
          9      > RETURN                                                   1

Class Base:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rk7sS
function name:  __construct
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_METHOD_CALL                                         'get'
          1        NEW                                              $0      'StdClass'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $0
          4        DO_FCALL                                      0          
    6     5      > RETURN                                                   null

End of function __construct

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

End of function get

End of class Base.

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

End of function get

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rk7sS
function name:  __construct
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_METHOD_CALL                                         'get'
          1        NEW                                              $0      'StdClass'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $0
          4        DO_FCALL                                      0          
    6     5      > RETURN                                                   null

End of function __construct

End of class Child1.

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

End of function __construct

Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rk7sS
function name:  get
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                                                 'Child'
          2        DO_ICALL                                                 
   26     3      > RETURN                                                   null

End of function get

End of class Child2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.35 ms | 1405 KiB | 15 Q