3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait A { private static $value = 'a'; final public static function get() { return self::$value; } } class B { use A; final public static function get() { return 'b'; } } echo B::get();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m3jK8
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   DECLARE_CLASS                                            'b'
   20     1        INIT_STATIC_METHOD_CALL                                  'B', 'get'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

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

End of function get

End of class A.

Class B:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m3jK8
function name:  get
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E > > RETURN                                                   'b'
          1*     > RETURN                                                   null

End of function get

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.23 ms | 1393 KiB | 13 Q