3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fib($m){$j=0;$k=1;for($i=0;$i<=$m;$i++){$l=$k;$k=$j+$k;$j=$l;}return$k;} var_dump(fib(1000));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/va94a
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'fib'
          2        SEND_VAL                                                 1000
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function fib:
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 = 12, Position 2 = 5
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 5
Branch analysis from position: 12
Branch analysis from position: 5
filename:       /in/va94a
function name:  fib
number of ops:  14
compiled vars:  !0 = $m, !1 = $j, !2 = $k, !3 = $i, !4 = $l
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        ASSIGN                                                   !1, 0
          2        ASSIGN                                                   !2, 1
          3        ASSIGN                                                   !3, 0
          4      > JMP                                                      ->10
          5    >   ASSIGN                                                   !4, !2
          6        ADD                                              ~9      !1, !2
          7        ASSIGN                                                   !2, ~9
          8        ASSIGN                                                   !1, !4
          9        PRE_INC                                                  !3
         10    >   IS_SMALLER_OR_EQUAL                                      !3, !0
         11      > JMPNZ                                                    ~13, ->5
         12    > > RETURN                                                   !2
         13*     > RETURN                                                   null

End of function fib

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.82 ms | 1398 KiB | 16 Q