3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(); for($i = 0 ; $i<=100000; $i++){ $array[$i] = $i; } function walk($a, $index = 0){ if (count($a) == $index + 1) { echo($a[$index].'-'); } else { walk($a, $index + 1); echo($a[$index].'-'); } } walk($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/kW7KD
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
    4     3    >   ASSIGN_DIM                                               !0, !1
          4        OP_DATA                                                  !1
    3     5        PRE_INC                                                  !1
          6    >   IS_SMALLER_OR_EQUAL                                      !1, 100000
          7      > JMPNZ                                                    ~6, ->3
   19     8    >   INIT_FCALL                                               'walk'
          9        SEND_VAR                                                 !0
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Function walk:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kW7KD
function name:  walk
number of ops:  19
compiled vars:  !0 = $a, !1 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      0
    8     2        COUNT                                            ~2      !0
          3        ADD                                              ~3      !1, 1
          4        IS_EQUAL                                                 ~2, ~3
          5      > JMPZ                                                     ~4, ->10
    9     6    >   FETCH_DIM_R                                      ~5      !0, !1
          7        CONCAT                                           ~6      ~5, '-'
          8        ECHO                                                     ~6
          9      > JMP                                                      ->18
   12    10    >   INIT_FCALL_BY_NAME                                       'walk'
         11        SEND_VAR_EX                                              !0
         12        ADD                                              ~7      !1, 1
         13        SEND_VAL_EX                                              ~7
         14        DO_FCALL                                      0          
   14    15        FETCH_DIM_R                                      ~9      !0, !1
         16        CONCAT                                           ~10     ~9, '-'
         17        ECHO                                                     ~10
   17    18    > > RETURN                                                   null

End of function walk

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.67 ms | 1399 KiB | 14 Q