3v4l.org

run code in 300+ PHP versions simultaneously
<?php class c { function test() { c::x(); } static function x() { var_dump(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)[0]['type'] == '->'); var_dump(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)); var_dump(isset($this)); } }; $x = new c; $x->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J4fPp
function name:  (null)
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'c'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function test

Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J4fPp
function name:  x
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'debug_backtrace'
          2        SEND_VAL                                                 2
          3        DO_ICALL                                         $0      
          4        FETCH_DIM_R                                      ~1      $0, 0
          5        FETCH_DIM_R                                      ~2      ~1, 'type'
          6        IS_EQUAL                                         ~3      ~2, '-%3E'
          7        SEND_VAL                                                 ~3
          8        DO_ICALL                                                 
    9     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'debug_backtrace'
         11        SEND_VAL                                                 2
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                                 
   10    15        INIT_FCALL                                               'var_dump'
         16        ISSET_ISEMPTY_THIS                               ~7      
         17        SEND_VAL                                                 ~7
         18        DO_ICALL                                                 
   11    19      > RETURN                                                   null

End of function x

End of class c.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.3 ms | 1396 KiB | 17 Q