3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.69 ms | 1393 KiB | 13 Q