3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dow = array("mon","tue","wed","thu","fri","sat","sun"); $pick_a_day = 5; // NOT zero based foreach($dow as $inc => $an_element ) { $pick_a_day++; echo $dow[($pick_a_day+(count($dow))) % (count($dow))]." loop number:".$inc."\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/Ao9Kl
function name:  (null)
number of ops:  18
compiled vars:  !0 = $dow, !1 = $pick_a_day, !2 = $an_element, !3 = $inc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 5
    7     2      > FE_RESET_R                                       $6      !0, ->16
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->16
          4    >   ASSIGN                                                   !3, ~7
    9     5        PRE_INC                                                  !1
   10     6        COUNT                                            ~10     !0
          7        ADD                                              ~11     !1, ~10
          8        COUNT                                            ~12     !0
          9        MOD                                              ~13     ~11, ~12
         10        FETCH_DIM_R                                      ~14     !0, ~13
         11        CONCAT                                           ~15     ~14, '+loop+number%3A'
         12        CONCAT                                           ~16     ~15, !3
         13        CONCAT                                           ~17     ~16, '%0A'
         14        ECHO                                                     ~17
    7    15      > JMP                                                      ->3
         16    >   FE_FREE                                                  $6
   13    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.57 ms | 1393 KiB | 13 Q