3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a($depth = 0) { if($depth === 1000) { return array_slice(array_filter(array_slice(debug_backtrace(), 0, 3)), -1, 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/AHsRh
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     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
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AHsRh
function name:  a
number of ops:  30
compiled vars:  !0 = $depth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      0
    5     1        IS_IDENTICAL                                             !0, 1000
          2      > JMPZ                                                     ~1, ->19
    6     3    >   INIT_FCALL                                               'array_slice'
          4        INIT_FCALL                                               'array_filter'
          5        INIT_FCALL                                               'array_slice'
          6        INIT_FCALL                                               'debug_backtrace'
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 3
         11        DO_ICALL                                         $3      
         12        SEND_VAR                                                 $3
         13        DO_ICALL                                         $4      
         14        SEND_VAR                                                 $4
         15        SEND_VAL                                                 -1
         16        SEND_VAL                                                 1
         17        DO_ICALL                                         $5      
         18      > RETURN                                                   $5
    9    19    >   INIT_FCALL_BY_NAME                                       'a'
         20        PRE_INC                                          ~6      !0
         21        SEND_VAL_EX                                              ~6
         22        INIT_FCALL                                               'str_repeat'
         23        SEND_VAL                                                 'a'
         24        SEND_VAL                                                 1000
         25        DO_ICALL                                         $7      
         26        SEND_VAR_NO_REF_EX                                       $7
         27        DO_FCALL                                      0  $8      
         28      > RETURN                                                   $8
   10    29*     > RETURN                                                   null

End of function a

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.58 ms | 1390 KiB | 24 Q