3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a($depth = 0) { //return last backtrace call. If backtrace bigger then 3, return third call. if($depth === 1000) { $tmp = debug_backtrace(false); if(isset($tmp[3])) return $tmp[3]; if(isset($tmp[2])) return $tmp[2]; if(isset($tmp[1])) return $tmp[1]; } return a(++$depth, str_repeat("a", 1000)); } var_dump(a());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gtX4M
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'a'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
          5      > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/gtX4M
function name:  a
number of ops:  30
compiled vars:  !0 = $depth, !1 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      0
    6     1        IS_IDENTICAL                                             !0, 1000
          2      > JMPZ                                                     ~2, ->19
    7     3    >   INIT_FCALL                                               'debug_backtrace'
          4        SEND_VAL                                                 <false>
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    8     7        ISSET_ISEMPTY_DIM_OBJ                         0          !1, 3
          8      > JMPZ                                                     ~5, ->11
          9    >   FETCH_DIM_R                                      ~6      !1, 3
         10      > RETURN                                                   ~6
    9    11    >   ISSET_ISEMPTY_DIM_OBJ                         0          !1, 2
         12      > JMPZ                                                     ~7, ->15
         13    >   FETCH_DIM_R                                      ~8      !1, 2
         14      > RETURN                                                   ~8
   10    15    >   ISSET_ISEMPTY_DIM_OBJ                         0          !1, 1
         16      > JMPZ                                                     ~9, ->19
         17    >   FETCH_DIM_R                                      ~10     !1, 1
         18      > RETURN                                                   ~10
   13    19    >   INIT_FCALL_BY_NAME                                       'a'
         20        PRE_INC                                          ~11     !0
         21        SEND_VAL_EX                                              ~11
         22        INIT_FCALL                                               'str_repeat'
         23        SEND_VAL                                                 'a'
         24        SEND_VAL                                                 1000
         25        DO_ICALL                                         $12     
         26        SEND_VAR_NO_REF_EX                                       $12
         27        DO_FCALL                                      0  $13     
         28      > RETURN                                                   $13
   14    29*     > RETURN                                                   null

End of function a

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.96 ms | 1403 KiB | 20 Q