3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fibo($n) { if ($n < 2) { return 1; } $prev = 0; $next = 1; for ($i=0; $i < $n; $i++) { $temp = $next + $prev; $prev = $next; $next = $temp; } return $next; } print fibo(30);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0N4CZ
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'fibo'
          1        SEND_VAL                                                 30
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function fibo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 8
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 8
Branch analysis from position: 15
Branch analysis from position: 8
filename:       /in/0N4CZ
function name:  fibo
number of ops:  17
compiled vars:  !0 = $n, !1 = $prev, !2 = $next, !3 = $i, !4 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        IS_SMALLER                                               !0, 2
          2      > JMPZ                                                     ~5, ->4
    7     3    > > RETURN                                                   1
    9     4    >   ASSIGN                                                   !1, 0
   10     5        ASSIGN                                                   !2, 1
   11     6        ASSIGN                                                   !3, 0
          7      > JMP                                                      ->13
   12     8    >   ADD                                              ~9      !2, !1
          9        ASSIGN                                                   !4, ~9
   13    10        ASSIGN                                                   !1, !2
   14    11        ASSIGN                                                   !2, !4
   11    12        PRE_INC                                                  !3
         13    >   IS_SMALLER                                               !3, !0
         14      > JMPNZ                                                    ~14, ->8
   16    15    > > RETURN                                                   !2
   17    16*     > RETURN                                                   null

End of function fibo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
208.79 ms | 1399 KiB | 14 Q