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,8); $i = 0; $s = ''; while ($item = current($arr)) { echo $i."\n"; $s .= "<a href='#'>$item</a>\n"; if ($i % 4 == 0) { $s .= "<li>$s</li>\n"; echo $s; $s = ''; } $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 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 4
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 4
Branch analysis from position: 28
Branch analysis from position: 4
Branch analysis from position: 19
filename:       /in/QvTFF
function name:  (null)
number of ops:  37
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                                                      ->23
    9     4    >   CONCAT                                           ~7      !1, '%0A'
          5        ECHO                                                     ~7
   10     6        ROPE_INIT                                     3  ~9      '%3Ca+href%3D%27%23%27%3E'
          7        ROPE_ADD                                      1  ~9      ~9, !3
          8        ROPE_END                                      2  ~8      ~9, '%3C%2Fa%3E%0A'
          9        ASSIGN_OP                                     8          !2, ~8
   12    10        MOD                                              ~12     !1, 4
         11        IS_EQUAL                                                 ~12, 0
         12      > JMPZ                                                     ~13, ->19
   13    13    >   ROPE_INIT                                     3  ~15     '%3Cli%3E'
         14        ROPE_ADD                                      1  ~15     ~15, !2
         15        ROPE_END                                      2  ~14     ~15, '%3C%2Fli%3E%0A'
         16        ASSIGN_OP                                     8          !2, ~14
   14    17        ECHO                                                     !2
   15    18        ASSIGN                                                   !2, ''
   18    19    >   PRE_INC                                                  !1
   19    20        INIT_FCALL                                               'next'
         21        SEND_REF                                                 !0
         22        DO_ICALL                                                 
    8    23    >   INIT_FCALL                                               'current'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                         $21     
         26        ASSIGN                                           ~22     !3, $21
         27      > JMPNZ                                                    ~22, ->4
   21    28    >   ECHO                                                     !1
   22    29        MOD                                              ~23     !1, 4
         30      > JMPZ                                                     ~23, ->33
         31    >   QM_ASSIGN                                        ~24     '%3C%2Fli%3E%0A'
         32      > JMP                                                      ->34
         33    >   QM_ASSIGN                                        ~24     ''
         34    >   ASSIGN_OP                                     8          !2, ~24
   24    35        ECHO                                                     !2
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.77 ms | 1400 KiB | 17 Q