3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fibonacci($n,$first = 0,$second = 1) { $fib = aray ($first,$second); for($i=1;$i<$n;$i++) { $fib[] = $fib[$i]+$fib[$i-1]; } return $fib; } echo "<pre>"; print_r(fibonacci(50));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4ahXP
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     '%3Cpre%3E'
   12     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'fibonacci'
          3        SEND_VAL                                                 50
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function fibonacci:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 10
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 10
Branch analysis from position: 19
Branch analysis from position: 10
filename:       /in/4ahXP
function name:  fibonacci
number of ops:  21
compiled vars:  !0 = $n, !1 = $first, !2 = $second, !3 = $fib, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      0
          2        RECV_INIT                                        !2      1
    4     3        INIT_FCALL_BY_NAME                                       'aray'
          4        SEND_VAR_EX                                              !1
          5        SEND_VAR_EX                                              !2
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !3, $5
    5     8        ASSIGN                                                   !4, 1
          9      > JMP                                                      ->17
    7    10    >   FETCH_DIM_R                                      ~9      !3, !4
         11        SUB                                              ~10     !4, 1
         12        FETCH_DIM_R                                      ~11     !3, ~10
         13        ADD                                              ~12     ~9, ~11
         14        ASSIGN_DIM                                               !3
         15        OP_DATA                                                  ~12
    5    16        PRE_INC                                                  !4
         17    >   IS_SMALLER                                               !4, !0
         18      > JMPNZ                                                    ~14, ->10
    9    19    > > RETURN                                                   !3
   10    20*     > RETURN                                                   null

End of function fibonacci

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.4 ms | 1398 KiB | 16 Q