3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[Attribute] class MyAttribute { public function __construct() { var_export(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT, 3)[1]['object']); } } #[MyAttribute] class C {} (fn () => (new ReflectionClass('C'))->getAttributes()[0]->newInstance())();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ilrqm
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   DECLARE_LAMBDA_FUNCTION                          ~0      [0]
          1        INIT_DYNAMIC_CALL                                        ~0
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ilrqm
function name:  {closure}
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   NEW                                              $0      'ReflectionClass'
          1        SEND_VAL_EX                                              'C'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'getAttributes'
          4        DO_FCALL                                      0  $2      
          5        FETCH_DIM_R                                      ~3      $2, 0
          6        INIT_METHOD_CALL                                         ~3, 'newInstance'
          7        DO_FCALL                                      0  $4      
          8      > RETURN                                                   $4
          9*     > RETURN                                                   null

End of Dynamic Function 0

Class MyAttribute:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ilrqm
function name:  __construct
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_export'
          1        INIT_FCALL                                               'debug_backtrace'
          2        SEND_VAL                                                 3
          3        SEND_VAL                                                 3
          4        DO_ICALL                                         $0      
          5        FETCH_DIM_R                                      ~1      $0, 1
          6        FETCH_DIM_R                                      ~2      ~1, 'object'
          7        SEND_VAL                                                 ~2
          8        DO_ICALL                                                 
    7     9      > RETURN                                                   null

End of function __construct

End of class MyAttribute.

Class C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.39 ms | 1007 KiB | 15 Q