3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function meh($somevar = __CLASS__) { var_dump($somevar); } } class Bar extends Foo { static function meh($somevar = 'another val') { parent::meh('blah'); } } Bar::meh();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N5HlT
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_STATIC_METHOD_CALL                                  'Bar', 'meh'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

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

End of function meh

End of class Foo.

Class Bar:
Function meh:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N5HlT
function name:  meh
number of ops:  5
compiled vars:  !0 = $somevar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV_INIT                                        !0      'another+val'
          1        INIT_STATIC_METHOD_CALL                                  'meh'
          2        SEND_VAL_EX                                              'blah'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   null

End of function meh

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.67 ms | 935 KiB | 16 Q