3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1000000); function recursive($array) { if ((array) $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/EEHQ0
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 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/EEHQ0
function name:  recursive
number of ops:  18
compiled vars:  !0 = $array, !1 = $new_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        CAST                                          7  ~2      !0
          2        IS_IDENTICAL                                     ~3      !0, ~2
          3      > JMPZ_EX                                          ~3      ~3, ->7
          4    >   FETCH_DIM_R                                      ~4      !0, 0
          5        IS_SMALLER                                       ~5      0, ~4
          6        BOOL                                             ~3      ~5
          7    > > JMPZ                                                     ~3, ->16
    7     8    >   FETCH_DIM_R                                      ~6      !0, 0
          9        SUB                                              ~7      ~6, 1
         10        INIT_ARRAY                                       ~8      ~7
         11        ASSIGN                                                   !1, ~8
    8    12        INIT_FCALL_BY_NAME                                       'recursive'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0          
         15      > JMP                                                      ->17
   11    16    > > RETURN                                                   null
   13    17    > > RETURN                                                   null

End of function recursive

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.29 ms | 1394 KiB | 13 Q