3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function lol() { var_dump('Calling in base class'); } } class Baz extends Foo { public function lol() { var_dump('Calling in sub class'); } } $x = new Baz(); $x->lol();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ippdc
function name:  (null)
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Baz'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'lol'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function lol

End of class Foo.

Class Baz:
Function lol:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ippdc
function name:  lol
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'Calling+in+sub+class'
          2        DO_ICALL                                                 
   16     3      > RETURN                                                   null

End of function lol

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.89 ms | 1395 KiB | 15 Q