3v4l.org

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

Class A: [no user functions]
Class B:
Function geta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e3SMZ
function name:  getA
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   FETCH_CLASS_CONSTANT                                 ~0      'CONST_A'
          1      > RETURN                                                       ~0
   13     2*     > RETURN                                                       null

End of function geta

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.97 ms | 2795 KiB | 13 Q