3v4l.org

run code in 300+ PHP versions simultaneously
<?php $images = range(1, 24); foreach ($images as $i => $image) { if ($i % 6 === 0) { echo "-- row-open"; } echo sprintf(" [ %d ] ", $image); if (($i + 1) % 6 === 0) { echo "-- row-close\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 23
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 23
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 22
Branch analysis from position: 12
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/Hf8SS
function name:  (null)
number of ops:  25
compiled vars:  !0 = $images, !1 = $image, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 24
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    5     5      > FE_RESET_R                                       $5      !0, ->23
          6    > > FE_FETCH_R                                       ~6      $5, !1, ->23
          7    >   ASSIGN                                                   !2, ~6
    6     8        MOD                                              ~8      !2, 6
          9        IS_IDENTICAL                                             ~8, 0
         10      > JMPZ                                                     ~9, ->12
    7    11    >   ECHO                                                     '--+row-open'
   10    12    >   INIT_FCALL                                               'sprintf'
         13        SEND_VAL                                                 '+%5B+%25d+%5D+'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $10     
         16        ECHO                                                     $10
   12    17        ADD                                              ~11     !2, 1
         18        MOD                                              ~12     ~11, 6
         19        IS_IDENTICAL                                             ~12, 0
         20      > JMPZ                                                     ~13, ->22
   13    21    >   ECHO                                                     '--+row-close%0A'
    5    22    > > JMP                                                      ->6
         23    >   FE_FREE                                                  $5
   15    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.75 ms | 1388 KiB | 17 Q