3v4l.org

run code in 300+ PHP versions simultaneously
<?php $names = array('Bill', 'Ben', 'Bert', 'Ernie'); $start = 2; for( $i = $start, $count = count( $names); ; $i++) { if( $i >= $count) $i = 0; if( $i == $start) break; echo $names[$i]; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
Branch analysis from position: 6
Branch analysis from position: 9
filename:       /in/3lUtn
function name:  (null)
number of ops:  17
compiled vars:  !0 = $names, !1 = $start, !2 = $i, !3 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 2
    4     2        ASSIGN                                                   !2, !1
          3        COUNT                                            ~7      !0
          4        ASSIGN                                                   !3, ~7
          5      > JMP                                                      ->15
    5     6    >   IS_SMALLER_OR_EQUAL                                      !3, !2
          7      > JMPZ                                                     ~9, ->9
          8    >   ASSIGN                                                   !2, 0
    6     9    >   IS_EQUAL                                                 !2, !1
         10      > JMPZ                                                     ~11, ->12
         11    > > JMP                                                      ->16
    7    12    >   FETCH_DIM_R                                      ~12     !0, !2
         13        ECHO                                                     ~12
    4    14        PRE_INC                                                  !2
         15    > > JMPNZ                                                    <true>, ->6
    8    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.05 ms | 1393 KiB | 13 Q