3v4l.org

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

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

End of function walk

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.2 ms | 1398 KiB | 14 Q