3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$arr = array(1,2,3,4,5,6,7,8,9,0); $arr = array(1,2,3,4,5,6,7); $i = 0; $s = ''; while ($item = current($arr)) { echo $i."\n"; $s .= !($i%4) ? "<li>\n" : ""; $s .= "<a href='#'>$item</a>\n"; $s .= !(($i+1)%4) ? "</li>\n" : ""; $i++; next($arr); } echo $i; $s .= ($i%4) ? "</li>\n" : ''; echo $s;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 4
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 39
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 4
Branch analysis from position: 34
Branch analysis from position: 4
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 4
Branch analysis from position: 34
Branch analysis from position: 4
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
Branch analysis from position: 23
filename:       /in/ZKSaa
function name:  (null)
number of ops:  43
compiled vars:  !0 = $arr, !1 = $i, !2 = $s, !3 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 0
    6     2        ASSIGN                                                   !2, ''
    8     3      > JMP                                                      ->29
    9     4    >   CONCAT                                           ~7      !1, '%0A'
          5        ECHO                                                     ~7
   11     6        MOD                                              ~8      !1, 4
          7        BOOL_NOT                                         ~9      ~8
          8      > JMPZ                                                     ~9, ->11
          9    >   QM_ASSIGN                                        ~10     '%3Cli%3E%0A'
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~10     ''
         12    >   ASSIGN_OP                                     8          !2, ~10
   12    13        ROPE_INIT                                     3  ~13     '%3Ca+href%3D%27%23%27%3E'
         14        ROPE_ADD                                      1  ~13     ~13, !3
         15        ROPE_END                                      2  ~12     ~13, '%3C%2Fa%3E%0A'
         16        ASSIGN_OP                                     8          !2, ~12
   13    17        ADD                                              ~16     !1, 1
         18        MOD                                              ~17     ~16, 4
         19        BOOL_NOT                                         ~18     ~17
         20      > JMPZ                                                     ~18, ->23
         21    >   QM_ASSIGN                                        ~19     '%3C%2Fli%3E%0A'
         22      > JMP                                                      ->24
         23    >   QM_ASSIGN                                        ~19     ''
         24    >   ASSIGN_OP                                     8          !2, ~19
   15    25        PRE_INC                                                  !1
   16    26        INIT_FCALL                                               'next'
         27        SEND_REF                                                 !0
         28        DO_ICALL                                                 
    8    29    >   INIT_FCALL                                               'current'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                         $23     
         32        ASSIGN                                           ~24     !3, $23
         33      > JMPNZ                                                    ~24, ->4
   18    34    >   ECHO                                                     !1
   19    35        MOD                                              ~25     !1, 4
         36      > JMPZ                                                     ~25, ->39
         37    >   QM_ASSIGN                                        ~26     '%3C%2Fli%3E%0A'
         38      > JMP                                                      ->40
         39    >   QM_ASSIGN                                        ~26     ''
         40    >   ASSIGN_OP                                     8          !2, ~26
   21    41        ECHO                                                     !2
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.84 ms | 1400 KiB | 17 Q