3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private function thing() { var_dump('asdf'); } } class Bar extends Foo { private function thing() { var_dump('qwer'); } public function getThing() { $this->thing(); } } $bar = new Bar(); $bar->getThing();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mSsrR
function name:  (null)
number of ops:  6
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'getThing'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Foo:
Function thing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mSsrR
function name:  thing
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'asdf'
          2        DO_ICALL                                                 
    5     3      > RETURN                                                   null

End of function thing

End of class Foo.

Class Bar:
Function thing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mSsrR
function name:  thing
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'qwer'
          2        DO_ICALL                                                 
   10     3      > RETURN                                                   null

End of function thing

Function getthing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mSsrR
function name:  getThing
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_METHOD_CALL                                         'thing'
          1        DO_FCALL                                      0          
   13     2      > RETURN                                                   null

End of function getthing

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.02 ms | 1395 KiB | 15 Q