3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 12.for_loops_fib.php $fib = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89]; $size = sizeof($fib); for($i = 0; $i < $size; $i++) { print $fib[$i].PHP_EOL; } // We can also create this same series using simple math. $a = 1; $b = 2; print $a.PHP_EOL; print $b.PHP_EOL; for($i = 0; $i < $size-2; $i++) { $newB = $a+$b; $a = $b; $b = $newB; print $newB.PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 5
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 19
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 19
Branch analysis from position: 29
Branch analysis from position: 19
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 5
Branch analysis from position: 11
Branch analysis from position: 5
filename:       /in/oFNDP
function name:  (null)
number of ops:  30
compiled vars:  !0 = $fib, !1 = $size, !2 = $i, !3 = $a, !4 = $b, !5 = $newB
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        COUNT                                            ~7      !0
          2        ASSIGN                                                   !1, ~7
    7     3        ASSIGN                                                   !2, 0
          4      > JMP                                                      ->9
    8     5    >   FETCH_DIM_R                                      ~10     !0, !2
          6        CONCAT                                           ~11     ~10, '%0A'
          7        ECHO                                                     ~11
    7     8        PRE_INC                                                  !2
          9    >   IS_SMALLER                                               !2, !1
         10      > JMPNZ                                                    ~13, ->5
   12    11    >   ASSIGN                                                   !3, 1
   13    12        ASSIGN                                                   !4, 2
   14    13        CONCAT                                           ~16     !3, '%0A'
         14        ECHO                                                     ~16
   15    15        CONCAT                                           ~17     !4, '%0A'
         16        ECHO                                                     ~17
   17    17        ASSIGN                                                   !2, 0
         18      > JMP                                                      ->26
   18    19    >   ADD                                              ~19     !3, !4
         20        ASSIGN                                                   !5, ~19
   19    21        ASSIGN                                                   !3, !4
   20    22        ASSIGN                                                   !4, !5
   21    23        CONCAT                                           ~23     !5, '%0A'
         24        ECHO                                                     ~23
   17    25        PRE_INC                                                  !2
         26    >   SUB                                              ~25     !1, 2
         27        IS_SMALLER                                               !2, ~25
         28      > JMPNZ                                                    ~26, ->19
   22    29    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.12 ms | 1435 KiB | 13 Q