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() { parent::thing(); } public function getThing() { $this->thing(); } } class Baz extends Foo { private function thing() { var_dump('qwer'); } public function getThing() { $this->thing(); } } $bar = new Bar(); $bar->getThing(); $baz = new Baz(); $baz->getThing();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SupfD
function name:  (null)
number of ops:  11
compiled vars:  !0 = $bar, !1 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $2      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   25     3        INIT_METHOD_CALL                                         !0, 'getThing'
          4        DO_FCALL                                      0          
   27     5        NEW                                              $6      'Baz'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
   28     8        INIT_METHOD_CALL                                         !1, 'getThing'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class Foo:
Function thing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SupfD
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/SupfD
function name:  thing
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_STATIC_METHOD_CALL                                  'thing'
          1        DO_FCALL                                      0          
   10     2      > 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/SupfD
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.

Class Baz:
Function thing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SupfD
function name:  thing
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'qwer'
          2        DO_ICALL                                                 
   19     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/SupfD
function name:  getThing
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_METHOD_CALL                                         'thing'
          1        DO_FCALL                                      0          
   22     2      > RETURN                                                   null

End of function getthing

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.27 ms | 1400 KiB | 15 Q