3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fibonachi($n) { $array = array(0); if ($n > 0) { $array[1] = 1; $array[2] = 1; for ($i = 2; $i < $n; $i++) { $array[$i] = bcadd($array[$i-1], $array[$i-2]); } } return $array; } $array = fibonachi(5); for ($i = 0; $i < count($array); $i++) { echo " ".$array[$i]; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 6
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 6
Branch analysis from position: 13
Branch analysis from position: 6
filename:       /in/GgGLU
function name:  (null)
number of ops:  14
compiled vars:  !0 = $array, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'fibonachi'
          1        SEND_VAL                                                 5
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !0, $2
   20     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->10
   21     6    >   FETCH_DIM_R                                      ~5      !0, !1
          7        CONCAT                                           ~6      '+', ~5
          8        ECHO                                                     ~6
   20     9        PRE_INC                                                  !1
         10    >   COUNT                                            ~8      !0
         11        IS_SMALLER                                               !1, ~8
         12      > JMPNZ                                                    ~9, ->6
   22    13    > > RETURN                                                   1

Function fibonachi:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 25
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 10
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 10
Branch analysis from position: 25
Branch analysis from position: 10
Branch analysis from position: 25
filename:       /in/GgGLU
function name:  fibonachi
number of ops:  27
compiled vars:  !0 = $n, !1 = $array, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, <array>
    6     2        IS_SMALLER                                               0, !0
          3      > JMPZ                                                     ~4, ->25
    7     4    >   ASSIGN_DIM                                               !1, 1
          5        OP_DATA                                                  1
    8     6        ASSIGN_DIM                                               !1, 2
          7        OP_DATA                                                  1
   10     8        ASSIGN                                                   !2, 2
          9      > JMP                                                      ->23
   11    10    >   INIT_FCALL_BY_NAME                                       'bcadd'
         11        CHECK_FUNC_ARG                                           
         12        SUB                                              ~9      !2, 1
         13        FETCH_DIM_FUNC_ARG                               $10     !1, ~9
         14        SEND_FUNC_ARG                                            $10
         15        CHECK_FUNC_ARG                                           
         16        SUB                                              ~11     !2, 2
         17        FETCH_DIM_FUNC_ARG                               $12     !1, ~11
         18        SEND_FUNC_ARG                                            $12
         19        DO_FCALL                                      0  $13     
         20        ASSIGN_DIM                                               !1, !2
         21        OP_DATA                                                  $13
   10    22        PRE_INC                                                  !2
         23    >   IS_SMALLER                                               !2, !0
         24      > JMPNZ                                                    ~15, ->10
   15    25    > > RETURN                                                   !1
   16    26*     > RETURN                                                   null

End of function fibonachi

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.1 ms | 1403 KiB | 17 Q