3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function __construct() { $this->something(); } public function something() { echo __CLASS__ . PHP_EOL; // foo } } class foo_bar extends foo { public function __construct() { parent::something(); $this->something(); } public function something() { echo __CLASS__ . PHP_EOL; // foo_bar } } class foo_bar_baz extends foo_bar { public function __construct() { foo::something(); parent::__construct(); $this->something(); } public function something() { echo __CLASS__ . PHP_EOL; // foo_bar_baz } } $obj = new foo_bar_baz();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6XPiG
function name:  (null)
number of ops:  4
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   NEW                                              $1      'foo_bar_baz'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

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

End of function __construct

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

End of function something

End of class foo.

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

End of function __construct

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

End of function something

End of class foo_bar.

Class foo_bar_baz:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6XPiG
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   INIT_STATIC_METHOD_CALL                                  'foo', 'something'
          1        DO_FCALL                                      0          
   30     2        INIT_STATIC_METHOD_CALL                                  
          3        DO_FCALL                                      0          
   31     4        INIT_METHOD_CALL                                         'something'
          5        DO_FCALL                                      0          
   32     6      > RETURN                                                   null

End of function __construct

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

End of function something

End of class foo_bar_baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.46 ms | 1390 KiB | 13 Q