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) { echo($a[$index]-9); } else { echo($a[$index]-9); walk($a, $index + 1); } } walk($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fLFPJ
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>
   15     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 = 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/fLFPJ
function name:  walk
number of ops:  19
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, ->10
    6     6    >   FETCH_DIM_R                                      ~5      !0, !1
          7        SUB                                              ~6      ~5, 9
          8        ECHO                                                     ~6
          9      > JMP                                                      ->18
    8    10    >   FETCH_DIM_R                                      ~7      !0, !1
         11        SUB                                              ~8      ~7, 9
         12        ECHO                                                     ~8
    9    13        INIT_FCALL_BY_NAME                                       'walk'
         14        SEND_VAR_EX                                              !0
         15        ADD                                              ~9      !1, 1
         16        SEND_VAL_EX                                              ~9
         17        DO_FCALL                                      0          
   13    18    > > RETURN                                                   null

End of function walk

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.9 ms | 1398 KiB | 14 Q