3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private function privateFoo() { echo "private a\n"; } protected function protectedFoo() { echo "protected a\n"; } public function run() { $this->privateFoo(); $this->protectedFoo(); } } class B extends A { protected function protectedFoo() { echo "protected b\n"; } public function runB() { $this->privateFoo(); $this->protectedFoo(); } } $b = new B(); $b->run(); $b->runB();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZQQZk
function name:  (null)
number of ops:  8
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   37     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   38     3        INIT_METHOD_CALL                                         !0, 'run'
          4        DO_FCALL                                      0          
   39     5        INIT_METHOD_CALL                                         !0, 'runB'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class A:
Function privatefoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZQQZk
function name:  privateFoo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'private+a%0A'
    8     1      > RETURN                                                   null

End of function privatefoo

Function protectedfoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZQQZk
function name:  protectedFoo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     'protected+a%0A'
   13     1      > RETURN                                                   null

End of function protectedfoo

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

End of function run

End of class A.

Class B:
Function protectedfoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZQQZk
function name:  protectedFoo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   ECHO                                                     'protected+b%0A'
   28     1      > RETURN                                                   null

End of function protectedfoo

Function runb:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZQQZk
function name:  runB
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   INIT_METHOD_CALL                                         'privateFoo'
          1        DO_FCALL                                      0          
   33     2        INIT_METHOD_CALL                                         'protectedFoo'
          3        DO_FCALL                                      0          
   34     4      > RETURN                                                   null

End of function runb

Function privatefoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZQQZk
function name:  privateFoo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'private+a%0A'
    8     1      > RETURN                                                   null

End of function privatefoo

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

End of function run

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.7 ms | 1399 KiB | 13 Q