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>" . PHP_EOL; $str .= "<li><a href='#'>$key2</a></li>" . PHP_EOL; if ($i % $count == $count - 1 || $i == $max - 1) $str .= "</ul>" . PHP_EOL; $i++; } echo $str;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 35
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 35
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 = 28, Position 2 = 31
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 33
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 33
Branch analysis from position: 31
Branch analysis from position: 19
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
filename:       /in/f6cAl
function name:  (null)
number of ops:  38
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, ->35
         14    > > FE_FETCH_R                                               $15, !5, ->35
   10    15    >   MOD                                              ~16     !2, !3
         16        IS_EQUAL                                                 ~16, 0
         17      > JMPZ                                                     ~17, ->19
   11    18    >   ASSIGN_OP                                     8          !4, '%3Cul%3E%0A'
   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        CONCAT                                           ~22     ~19, '%0A'
         23        ASSIGN_OP                                     8          !4, ~22
   15    24        MOD                                              ~24     !2, !3
         25        SUB                                              ~25     !3, 1
         26        IS_EQUAL                                         ~26     ~24, ~25
         27      > JMPNZ_EX                                         ~26     ~26, ->31
         28    >   SUB                                              ~27     !1, 1
         29        IS_EQUAL                                         ~28     !2, ~27
         30        BOOL                                             ~26     ~28
         31    > > JMPZ                                                     ~26, ->33
   16    32    >   ASSIGN_OP                                     8          !4, '%3C%2Ful%3E%0A'
   17    33    >   PRE_INC                                                  !2
    8    34      > JMP                                                      ->14
         35    >   FE_FREE                                                  $15
   20    36        ECHO                                                     !4
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.09 ms | 1400 KiB | 15 Q