3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $test; public function __construct() { $this->test = 1; } protected function increaseTest() { $this->test++; } public function getTest() { return $this->test; } } class TestChild extends Test { public function increase() { $this->increaseTest(); } } $test = new TestChild(); echo $test->getTest() . "\n"; $test->increase(); echo $test->getTest() . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kARXW
function name:  (null)
number of ops:  14
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   NEW                                              $1      'TestChild'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   32     3        INIT_METHOD_CALL                                         !0, 'getTest'
          4        DO_FCALL                                      0  $4      
          5        CONCAT                                           ~5      $4, '%0A'
          6        ECHO                                                     ~5
   33     7        INIT_METHOD_CALL                                         !0, 'increase'
          8        DO_FCALL                                      0          
   34     9        INIT_METHOD_CALL                                         !0, 'getTest'
         10        DO_FCALL                                      0  $7      
         11        CONCAT                                           ~8      $7, '%0A'
         12        ECHO                                                     ~8
         13      > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kARXW
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN_OBJ                                               'test'
          1        OP_DATA                                                  1
   10     2      > RETURN                                                   null

End of function __construct

Function increasetest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kARXW
function name:  increaseTest
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   PRE_INC_OBJ                                              'test'
   15     1      > RETURN                                                   null

End of function increasetest

Function gettest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kARXW
function name:  getTest
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   FETCH_OBJ_R                                      ~0      'test'
          1      > RETURN                                                   ~0
   20     2*     > RETURN                                                   null

End of function gettest

End of class Test.

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

End of function increase

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kARXW
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN_OBJ                                               'test'
          1        OP_DATA                                                  1
   10     2      > RETURN                                                   null

End of function __construct

Function increasetest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kARXW
function name:  increaseTest
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   PRE_INC_OBJ                                              'test'
   15     1      > RETURN                                                   null

End of function increasetest

Function gettest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kARXW
function name:  getTest
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   FETCH_OBJ_R                                      ~0      'test'
          1      > RETURN                                                   ~0
   20     2*     > RETURN                                                   null

End of function gettest

End of class TestChild.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.57 ms | 1399 KiB | 13 Q