3v4l.org

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

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

End of function fibs_under_100

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.28 ms | 1398 KiB | 16 Q