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%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 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 4
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
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 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 4
Branch analysis from position: 33
Branch analysis from position: 4
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 4
Branch analysis from position: 33
Branch analysis from position: 4
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
Branch analysis from position: 22
filename:       /in/VcIHN
function name:  (null)
number of ops:  42
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                                                      ->28
    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        MOD                                              ~16     !1, 4
         18        BOOL_NOT                                         ~17     ~16
         19      > JMPZ                                                     ~17, ->22
         20    >   QM_ASSIGN                                        ~18     '%3C%2Fli%3E%0A'
         21      > JMP                                                      ->23
         22    >   QM_ASSIGN                                        ~18     ''
         23    >   ASSIGN_OP                                     8          !2, ~18
   15    24        PRE_INC                                                  !1
   16    25        INIT_FCALL                                               'next'
         26        SEND_REF                                                 !0
         27        DO_ICALL                                                 
    8    28    >   INIT_FCALL                                               'current'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $22     
         31        ASSIGN                                           ~23     !3, $22
         32      > JMPNZ                                                    ~23, ->4
   18    33    >   ECHO                                                     !1
   19    34        MOD                                              ~24     !1, 4
         35      > JMPZ                                                     ~24, ->38
         36    >   QM_ASSIGN                                        ~25     '%3C%2Fli%3E%0A'
         37      > JMP                                                      ->39
         38    >   QM_ASSIGN                                        ~25     ''
         39    >   ASSIGN_OP                                     8          !2, ~25
   21    40        ECHO                                                     !2
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.06 ms | 1400 KiB | 17 Q