3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $foo; public function setFooA($value) { $this->foo = $value; } public function getFooA($value) { return $this->foo; } } class B extends A { protected $foo; public function setFooB($value) { $this->foo = $value; } public function getFooB($value) { return $this->foo; } } $thing = new B; $thing->setFooB('stuff'); var_dump($thing->getFooA());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Umc4r
function name:  (null)
number of ops:  12
compiled vars:  !0 = $thing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   34     3        INIT_METHOD_CALL                                         !0, 'setFooB'
          4        SEND_VAL_EX                                              'stuff'
          5        DO_FCALL                                      0          
   35     6        INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !0, 'getFooA'
          8        DO_FCALL                                      0  $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class A:
Function setfooa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Umc4r
function name:  setFooA
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ASSIGN_OBJ                                               'foo'
          2        OP_DATA                                                  !0
   10     3      > RETURN                                                   null

End of function setfooa

Function getfooa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Umc4r
function name:  getFooA
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        FETCH_OBJ_R                                      ~1      'foo'
          2      > RETURN                                                   ~1
   15     3*     > RETURN                                                   null

End of function getfooa

End of class A.

Class B:
Function setfoob:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Umc4r
function name:  setFooB
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   23     1        ASSIGN_OBJ                                               'foo'
          2        OP_DATA                                                  !0
   24     3      > RETURN                                                   null

End of function setfoob

Function getfoob:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Umc4r
function name:  getFooB
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
   28     1        FETCH_OBJ_R                                      ~1      'foo'
          2      > RETURN                                                   ~1
   29     3*     > RETURN                                                   null

End of function getfoob

Function setfooa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Umc4r
function name:  setFooA
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ASSIGN_OBJ                                               'foo'
          2        OP_DATA                                                  !0
   10     3      > RETURN                                                   null

End of function setfooa

Function getfooa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Umc4r
function name:  getFooA
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        FETCH_OBJ_R                                      ~1      'foo'
          2      > RETURN                                                   ~1
   15     3*     > RETURN                                                   null

End of function getfooa

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.44 ms | 1400 KiB | 15 Q