3v4l.org

run code in 300+ PHP versions simultaneously
<?php function call_debug_backtrace() { $bt = debug_backtrace(); $bt[1]["args"][0] = "altered"; } function foo(&$a) { var_dump($a); call_debug_backtrace(); var_dump($a); } $a = 1; foo($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vs8lG
function name:  (null)
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN                                                   !0, 1
   15     1        INIT_FCALL                                               'foo'
          2        SEND_REF                                                 !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function call_debug_backtrace:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vs8lG
function name:  call_debug_backtrace
number of ops:  8
compiled vars:  !0 = $bt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'debug_backtrace'
          1        DO_ICALL                                         $1      
          2        ASSIGN                                                   !0, $1
    5     3        FETCH_DIM_W                                      $3      !0, 1
          4        FETCH_DIM_W                                      $4      $3, 'args'
          5        ASSIGN_DIM                                               $4, 0
          6        OP_DATA                                                  'altered'
    6     7      > RETURN                                                   null

End of function call_debug_backtrace

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vs8lG
function name:  foo
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   10     4        INIT_FCALL                                               'call_debug_backtrace'
          5        DO_FCALL                                      0          
   11     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   12     9      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.7 ms | 1403 KiB | 19 Q