3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait foo { public static function outX() { echo self::$test; } } class bar { use foo; public static $test = 'ololo2'; public static function out() { self::outX(); } } class baz extends bar { public static $test = 'ololo3'; public static function out2() { self::outX(); } } bar::out(); baz::out();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0frqh
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'bar'
   19     1        DECLARE_CLASS                                            'baz', 'bar'
   26     2        INIT_STATIC_METHOD_CALL                                  'bar', 'out'
          3        DO_FCALL                                      0          
   27     4        INIT_STATIC_METHOD_CALL                                  'baz', 'out'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class foo:
Function outx:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0frqh
function name:  outX
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      'test'
          1        ECHO                                                     ~0
    6     2      > RETURN                                                   null

End of function outx

End of class foo.

Class bar:
Function out:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0frqh
function name:  out
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'outX'
          1        DO_FCALL                                      0          
   16     2      > RETURN                                                   null

End of function out

End of class bar.

Class baz:
Function out2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0frqh
function name:  out2
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_STATIC_METHOD_CALL                                  'outX'
          1        DO_FCALL                                      0          
   23     2      > RETURN                                                   null

End of function out2

End of class baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.91 ms | 1394 KiB | 13 Q