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 = 9){ if (0 == $index -1) { echo($a[$index]); } else { echo($a[$index]); walk($a, $index -1); } } walk($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kinUf
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 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kinUf
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      9
    5     2        SUB                                              ~2      !1, 1
          3        IS_EQUAL                                                 ~2, 0
          4      > JMPZ                                                     ~3, ->8
    6     5    >   FETCH_DIM_R                                      ~4      !0, !1
          6        ECHO                                                     ~4
          7      > JMP                                                      ->15
    8     8    >   FETCH_DIM_R                                      ~5      !0, !1
          9        ECHO                                                     ~5
    9    10        INIT_FCALL_BY_NAME                                       'walk'
         11        SEND_VAR_EX                                              !0
         12        SUB                                              ~6      !1, 1
         13        SEND_VAL_EX                                              ~6
         14        DO_FCALL                                      0          
   13    15    > > RETURN                                                   null

End of function walk

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.92 ms | 1397 KiB | 14 Q