3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static $val = 'Foo'; public static function huh() { echo self::$val; } } class Bar extends Foo { public static $val = 'Bar'; } Foo::huh(); Bar::huh();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bfir7
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_STATIC_METHOD_CALL                                  'Foo', 'huh'
          1        DO_FCALL                                      0          
   13     2        INIT_STATIC_METHOD_CALL                                  'Bar', 'huh'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class Foo:
Function huh:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bfir7
function name:  huh
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'val'
          1        ECHO                                                     ~0
    6     2      > RETURN                                                   null

End of function huh

End of class Foo.

Class Bar:
Function huh:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bfir7
function name:  huh
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'val'
          1        ECHO                                                     ~0
    6     2      > RETURN                                                   null

End of function huh

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160 ms | 1393 KiB | 13 Q