3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $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/1TUqo
function name:  (null)
number of ops:  14
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'TestChild'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        INIT_METHOD_CALL                                         !0, 'getTest'
          4        DO_FCALL                                      0  $4      
          5        CONCAT                                           ~5      $4, '%0A'
          6        ECHO                                                     ~5
   28     7        INIT_METHOD_CALL                                         !0, 'increase'
          8        DO_FCALL                                      0          
   29     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 increasetest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1TUqo
function name:  increaseTest
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   PRE_INC_OBJ                                              'test'
   10     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/1TUqo
function name:  getTest
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'test'
          1      > RETURN                                                   ~0
   15     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/1TUqo
function name:  increase
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_METHOD_CALL                                         'increaseTest'
          1        DO_FCALL                                      0          
   23     2      > RETURN                                                   null

End of function increase

Function increasetest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1TUqo
function name:  increaseTest
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   PRE_INC_OBJ                                              'test'
   10     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/1TUqo
function name:  getTest
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'test'
          1      > RETURN                                                   ~0
   15     2*     > RETURN                                                   null

End of function gettest

End of class TestChild.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.1 ms | 1399 KiB | 13 Q