3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('SUN',0); define('MON',1); define('TUE',2); define('WED',3); $weekStart = TUE; for($i = 0 + $weekStart; $i<=6+$weekStart ; $i++){ echo $i%7 . "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 21
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 21
Branch analysis from position: 28
Branch analysis from position: 21
filename:       /in/i2I05
function name:  (null)
number of ops:  29
compiled vars:  !0 = $weekStart, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'SUN'
          2        SEND_VAL                                                 0
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'MON'
          6        SEND_VAL                                                 1
          7        DO_ICALL                                                 
    4     8        INIT_FCALL                                               'define'
          9        SEND_VAL                                                 'TUE'
         10        SEND_VAL                                                 2
         11        DO_ICALL                                                 
    5    12        INIT_FCALL                                               'define'
         13        SEND_VAL                                                 'WED'
         14        SEND_VAL                                                 3
         15        DO_ICALL                                                 
    7    16        FETCH_CONSTANT                                   ~6      'TUE'
         17        ASSIGN                                                   !0, ~6
    9    18        ADD                                              ~8      0, !0
         19        ASSIGN                                                   !1, ~8
         20      > JMP                                                      ->25
   10    21    >   MOD                                              ~10     !1, 7
         22        CONCAT                                           ~11     ~10, '%0A'
         23        ECHO                                                     ~11
    9    24        PRE_INC                                                  !1
         25    >   ADD                                              ~13     6, !0
         26        IS_SMALLER_OR_EQUAL                                      !1, ~13
         27      > JMPNZ                                                    ~14, ->21
   11    28    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.64 ms | 1396 KiB | 15 Q