3v4l.org

run code in 300+ PHP versions simultaneously
<?php function brokenTrace($arg1, $arg2) { backtraceWrapper(); unset($arg1); backtraceWrapper(); unset($arg2); backtraceWrapper(); } function backtraceWrapper() { $bt = debug_backtrace(); $args = $bt[1]['args']; print_r($args); var_dump($args); foreach ($args as $arg); for ($i = 0; $i < count($args); $i++) { var_dump($args[$i]); } } brokenTrace("A", "B");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tTmDb
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   INIT_FCALL                                               'brokentrace'
          1        SEND_VAL                                                 'A'
          2        SEND_VAL                                                 'B'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function brokentrace:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tTmDb
function name:  brokenTrace
number of ops:  11
compiled vars:  !0 = $arg1, !1 = $arg2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL_BY_NAME                                       'backtraceWrapper'
          3        DO_FCALL                                      0          
    6     4        UNSET_CV                                                 !0
    7     5        INIT_FCALL_BY_NAME                                       'backtraceWrapper'
          6        DO_FCALL                                      0          
    8     7        UNSET_CV                                                 !1
    9     8        INIT_FCALL_BY_NAME                                       'backtraceWrapper'
          9        DO_FCALL                                      0          
   10    10      > RETURN                                                   null

End of function brokentrace

Function backtracewrapper:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 18
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 18
Branch analysis from position: 26
Branch analysis from position: 18
Branch analysis from position: 15
filename:       /in/tTmDb
function name:  backtraceWrapper
number of ops:  27
compiled vars:  !0 = $bt, !1 = $args, !2 = $arg, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'debug_backtrace'
          1        DO_ICALL                                         $4      
          2        ASSIGN                                                   !0, $4
   15     3        FETCH_DIM_R                                      ~6      !0, 1
          4        FETCH_DIM_R                                      ~7      ~6, 'args'
          5        ASSIGN                                                   !1, ~7
   17     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   18     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   20    12      > FE_RESET_R                                       $11     !1, ->15
         13    > > FE_FETCH_R                                               $11, !2, ->15
         14    > > JMP                                                      ->13
         15    >   FE_FREE                                                  $11
   22    16        ASSIGN                                                   !3, 0
         17      > JMP                                                      ->23
   23    18    >   INIT_FCALL                                               'var_dump'
         19        FETCH_DIM_R                                      ~13     !1, !3
         20        SEND_VAL                                                 ~13
         21        DO_ICALL                                                 
   22    22        PRE_INC                                                  !3
         23    >   COUNT                                            ~16     !1
         24        IS_SMALLER                                               !3, ~16
         25      > JMPNZ                                                    ~17, ->18
   25    26    > > RETURN                                                   null

End of function backtracewrapper

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.51 ms | 1403 KiB | 20 Q