3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { protected $foo; private function foo() { $this->foo = 'A-foo'; } public function bar() { $this->foo(); return $this->foo; } } class B extends A { private function foo() { $this->foo = 'B-foo'; } } echo (new B())->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/InSq9
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   28     0  E >   NEW                                                  $0      'B'
          1        DO_FCALL                                          0          
          2        INIT_METHOD_CALL                                             $0, 'bar'
          3        DO_FCALL                                          0  $2      
          4        ECHO                                                         $2
          5      > RETURN                                                       1

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

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/InSq9
function name:  bar
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   INIT_METHOD_CALL                                             'foo'
          1        DO_FCALL                                          0          
   16     2        FETCH_OBJ_R                                          ~1      'foo'
          3      > RETURN                                                       ~1
   17     4*     > RETURN                                                       null

End of function bar

End of class A.

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

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/InSq9
function name:  bar
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   INIT_METHOD_CALL                                             'foo'
          1        DO_FCALL                                          0          
   16     2        FETCH_OBJ_R                                          ~1      'foo'
          3      > RETURN                                                       ~1
   17     4*     > RETURN                                                       null

End of function bar

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.23 ms | 2588 KiB | 13 Q