3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace f; function test() { test2(); } function test2() { print_r(getnext(debug_backtrace(0))); } function getnext($a) { return current(array_slice($a, 1, 1, true)); } for ($i = 0; $i <= 5000; $i++) { test(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 2
Branch analysis from position: 7
Branch analysis from position: 2
filename:       /in/FgIej
function name:  (null)
number of ops:  8
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->5
   18     2    >   INIT_NS_FCALL_BY_NAME                                    'f%5Ctest'
          3        DO_FCALL                                      0          
   17     4        PRE_INC                                                  !0
          5    >   IS_SMALLER_OR_EQUAL                                      !0, 5000
          6      > JMPNZ                                                    ~4, ->2
   19     7    > > RETURN                                                   1

Function f%5Ctest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FgIej
function name:  f\test
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_NS_FCALL_BY_NAME                                    'f%5Ctest2'
          1        DO_FCALL                                      0          
    7     2      > RETURN                                                   null

End of function f%5Ctest

Function f%5Ctest2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FgIej
function name:  f\test2
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_NS_FCALL_BY_NAME                                    'f%5Cprint_r'
          1        INIT_NS_FCALL_BY_NAME                                    'f%5Cgetnext'
          2        INIT_NS_FCALL_BY_NAME                                    'f%5Cdebug_backtrace'
          3        SEND_VAL_EX                                              0
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR_NO_REF_EX                                       $0
          6        DO_FCALL                                      0  $1      
          7        SEND_VAR_NO_REF_EX                                       $1
          8        DO_FCALL                                      0          
   11     9      > RETURN                                                   null

End of function f%5Ctest2

Function f%5Cgetnext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FgIej
function name:  f\getnext
number of ops:  12
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        INIT_NS_FCALL_BY_NAME                                    'f%5Ccurrent'
          2        INIT_NS_FCALL_BY_NAME                                    'f%5Carray_slice'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAL_EX                                              1
          5        SEND_VAL_EX                                              1
          6        SEND_VAL_EX                                              <true>
          7        DO_FCALL                                      0  $1      
          8        SEND_VAR_NO_REF_EX                                       $1
          9        DO_FCALL                                      0  $2      
         10      > RETURN                                                   $2
   15    11*     > RETURN                                                   null

End of function f%5Cgetnext

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.57 ms | 1403 KiB | 25 Q