3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Values { /** * Provides a template method for enum values representing the method name. * This can be aliased in an enum class. * * @return static|null */ final public static function ORIGINAL() { $MethodName = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]['function']; var_dump($MethodName);; } } class Imp { use Values { ORIGINAL as RENAMED; } } Imp::RENAMED();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MOnev
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   DECLARE_CLASS                                            'imp'
   23     1        INIT_STATIC_METHOD_CALL                                  'Imp', 'RENAMED'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Class Values:
Function original:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MOnev
function name:  ORIGINAL
number of ops:  11
compiled vars:  !0 = $MethodName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'debug_backtrace'
          1        SEND_VAL                                                 2
          2        SEND_VAL                                                 1
          3        DO_ICALL                                         $1      
          4        FETCH_DIM_R                                      ~2      $1, 0
          5        FETCH_DIM_R                                      ~3      ~2, 'function'
          6        ASSIGN                                                   !0, ~3
   13     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   14    10      > RETURN                                                   null

End of function original

End of class Values.

Class Imp: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.2 ms | 1395 KiB | 17 Q