3v4l.org

run code in 500+ PHP versions simultaneously
<?php $products = [ 451, 455, 453 ]; $modfactor = count($products); $days = null; $weekdays = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]; for ($i=0, $max = 7; $i < $max; $i++) { $days[$i] = $i % $modfactor; } foreach ($weekdays as $dex => $wday) { echo "$wday, "; echo $products[ $days[$dex] ], "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 8
Branch analysis from position: 14
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 25
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 25
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 8
Branch analysis from position: 14
Branch analysis from position: 8
filename:       /in/9K3FR
function name:  (null)
number of ops:  27
compiled vars:  !0 = $products, !1 = $modfactor, !2 = $days, !3 = $weekdays, !4 = $i, !5 = $max, !6 = $wday, !7 = $dex
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    8     1        COUNT                                                ~9      !0
          2        ASSIGN                                                       !1, ~9
    9     3        ASSIGN                                                       !2, null
   11     4        ASSIGN                                                       !3, <array>
   13     5        ASSIGN                                                       !4, 0
          6        ASSIGN                                                       !5, 7
          7      > JMP                                                          ->12
   14     8    >   MOD                                                  ~16     !4, !1
          9        ASSIGN_DIM                                                   !2, !4
         10        OP_DATA                                                      ~16
   13    11        PRE_INC                                                      !4
         12    >   IS_SMALLER                                                   !4, !5
         13      > JMPNZ                                                        ~18, ->8
   18    14    > > FE_RESET_R                                           $19     !3, ->25
         15    > > FE_FETCH_R                                           ~20     $19, !6, ->25
         16    >   ASSIGN                                                       !7, ~20
   19    17        NOP                                                          
         18        FAST_CONCAT                                          ~22     !6, '%2C+'
         19        ECHO                                                         ~22
   20    20        FETCH_DIM_R                                          ~23     !2, !7
         21        FETCH_DIM_R                                          ~24     !0, ~23
         22        ECHO                                                         ~24
         23        ECHO                                                         '%0A'
   18    24      > JMP                                                          ->15
         25    >   FE_FREE                                                      $19
   21    26      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
131.89 ms | 2073 KiB | 13 Q