3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $foo; public function setFooA($value) { $this->foo = $value; } public function getFooA() { return $this->foo; } } class B extends A { protected $foo; public function setFooB($value) { $this->foo = $value; } public function getFooB() { return $this->foo; } } $thing = new B; $thing->setFooA('stuff'); $thing->setFooB('things'); var_dump($thing->getFooA()); var_dump($thing->getFooB());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TuND0
function name:  (null)
number of ops:  20
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, 'setFooA'
          4        SEND_VAL_EX                                              'stuff'
          5        DO_FCALL                                      0          
   35     6        INIT_METHOD_CALL                                         !0, 'setFooB'
          7        SEND_VAL_EX                                              'things'
          8        DO_FCALL                                      0          
   36     9        INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !0, 'getFooA'
         11        DO_FCALL                                      0  $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
   37    14        INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !0, 'getFooB'
         16        DO_FCALL                                      0  $8      
         17        SEND_VAR                                                 $8
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Class A:
Function setfooa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TuND0
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/TuND0
function name:  getFooA
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'foo'
          1      > RETURN                                                   ~0
   15     2*     > 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/TuND0
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/TuND0
function name:  getFooB
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   FETCH_OBJ_R                                      ~0      'foo'
          1      > RETURN                                                   ~0
   29     2*     > 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/TuND0
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/TuND0
function name:  getFooA
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'foo'
          1      > RETURN                                                   ~0
   15     2*     > RETURN                                                   null

End of function getfooa

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.35 ms | 1400 KiB | 15 Q