3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(10000); function recursive($array) { if (is_array($array) && $array[0] > 0) { $new_array = array($array[0] - 1); recursive($new_array); } else { return; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AaESj
function name:  (null)
number of ops:  2
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   13     1      > RETURN                                                   1

Function recursive:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/AaESj
function name:  recursive
number of ops:  17
compiled vars:  !0 = $array, !1 = $new_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        TYPE_CHECK                                  128  ~2      !0
          2      > JMPZ_EX                                          ~2      ~2, ->6
          3    >   FETCH_DIM_R                                      ~3      !0, 0
          4        IS_SMALLER                                       ~4      0, ~3
          5        BOOL                                             ~2      ~4
          6    > > JMPZ                                                     ~2, ->15
    7     7    >   FETCH_DIM_R                                      ~5      !0, 0
          8        SUB                                              ~6      ~5, 1
          9        INIT_ARRAY                                       ~7      ~6
         10        ASSIGN                                                   !1, ~7
    8    11        INIT_FCALL_BY_NAME                                       'recursive'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
         14      > JMP                                                      ->16
   11    15    > > RETURN                                                   null
   13    16    > > RETURN                                                   null

End of function recursive

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.5 ms | 1394 KiB | 13 Q