3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value['title'] = range(0, 10); $max = count($value['title']); $i = 0; $count = 4; $str = ''; foreach ($value['title'] as $key2) { if ($i % $count == 0) $str .= "<ul>"; $str .= "<li><a href='#'>$key2</a></li>"; if ($i % $count == $count - 1 || $i == $max - 1) $str .= "</ul>"; $i++; } echo $str;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 34
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 34
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
2 jumps found. (Code = 47) Position 1 = 27, Position 2 = 30
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 32
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 32
Branch analysis from position: 30
Branch analysis from position: 19
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/aNCfo
function name:  (null)
number of ops:  37
compiled vars:  !0 = $value, !1 = $max, !2 = $i, !3 = $count, !4 = $str, !5 = $key2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 10
          3        DO_ICALL                                         $7      
          4        ASSIGN_DIM                                               !0, 'title'
          5        OP_DATA                                                  $7
    4     6        FETCH_DIM_R                                      ~8      !0, 'title'
          7        COUNT                                            ~9      ~8
          8        ASSIGN                                                   !1, ~9
    5     9        ASSIGN                                                   !2, 0
    6    10        ASSIGN                                                   !3, 4
    7    11        ASSIGN                                                   !4, ''
    8    12        FETCH_DIM_R                                      ~14     !0, 'title'
         13      > FE_RESET_R                                       $15     ~14, ->34
         14    > > FE_FETCH_R                                               $15, !5, ->34
   10    15    >   MOD                                              ~16     !2, !3
         16        IS_EQUAL                                                 ~16, 0
         17      > JMPZ                                                     ~17, ->19
   11    18    >   ASSIGN_OP                                     8          !4, '%3Cul%3E'
   13    19    >   ROPE_INIT                                     3  ~20     '%3Cli%3E%3Ca+href%3D%27%23%27%3E'
         20        ROPE_ADD                                      1  ~20     ~20, !5
         21        ROPE_END                                      2  ~19     ~20, '%3C%2Fa%3E%3C%2Fli%3E'
         22        ASSIGN_OP                                     8          !4, ~19
   15    23        MOD                                              ~23     !2, !3
         24        SUB                                              ~24     !3, 1
         25        IS_EQUAL                                         ~25     ~23, ~24
         26      > JMPNZ_EX                                         ~25     ~25, ->30
         27    >   SUB                                              ~26     !1, 1
         28        IS_EQUAL                                         ~27     !2, ~26
         29        BOOL                                             ~25     ~27
         30    > > JMPZ                                                     ~25, ->32
   16    31    >   ASSIGN_OP                                     8          !4, '%3C%2Ful%3E'
   17    32    >   PRE_INC                                                  !2
    8    33      > JMP                                                      ->14
         34    >   FE_FREE                                                  $15
   20    35        ECHO                                                     !4
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.59 ms | 1392 KiB | 15 Q