3v4l.org

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

Class Foo:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ekenO
function name:  foo
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 foo

End of class Foo.

Class Baz:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ekenO
function name:  foo
number of ops:  6
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        INIT_STATIC_METHOD_CALL                                  'foo'
          4        DO_FCALL                                      0          
   17     5      > RETURN                                                   null

End of function foo

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.24 ms | 1395 KiB | 15 Q