3v4l.org

run code in 500+ PHP versions simultaneously
<?php $food = range(1,36); foreach (array_chunk($food, 3, true) as $key => $array) { $oddeven = ($key%2 == 1) ? " class='even'":""; echo '<ul'.$oddeven.'>'; foreach ($array as $item) { echo '<li>'.$item.'</li>'; } echo '</ul>'."\r\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 32
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 32
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 77) Position 1 = 24, Position 2 = 29
Branch analysis from position: 24
2 jumps found. (Code = 78) Position 1 = 25, Position 2 = 29
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 29
Branch analysis from position: 18
2 jumps found. (Code = 77) Position 1 = 24, Position 2 = 29
Branch analysis from position: 24
Branch analysis from position: 29
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/LdSgJ
function name:  (null)
number of ops:  34
compiled vars:  !0 = $food, !1 = $array, !2 = $key, !3 = $oddeven, !4 = $item
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                                   'range'
          1        SEND_VAL                                                     1
          2        SEND_VAL                                                     36
          3        DO_ICALL                                             $5      
          4        ASSIGN                                                       !0, $5
    3     5        INIT_FCALL                                                   'array_chunk'
          6        SEND_VAR                                                     !0
          7        SEND_VAL                                                     3
          8        SEND_VAL                                                     <true>
          9        DO_ICALL                                             $7      
         10      > FE_RESET_R                                           $8      $7, ->32
         11    > > FE_FETCH_R                                           ~9      $8, !1, ->32
         12    >   ASSIGN                                                       !2, ~9
    4    13        MOD                                                  ~11     !2, 2
         14        IS_EQUAL                                                     ~11, 1
         15      > JMPZ                                                         ~12, ->18
         16    >   QM_ASSIGN                                            ~13     '+class%3D%27even%27'
         17      > JMP                                                          ->19
         18    >   QM_ASSIGN                                            ~13     ''
         19    >   ASSIGN                                                       !3, ~13
    5    20        CONCAT                                               ~15     '%3Cul', !3
         21        CONCAT                                               ~16     ~15, '%3E'
         22        ECHO                                                         ~16
    6    23      > FE_RESET_R                                           $17     !1, ->29
         24    > > FE_FETCH_R                                                   $17, !4, ->29
    7    25    >   CONCAT                                               ~18     '%3Cli%3E', !4
         26        CONCAT                                               ~19     ~18, '%3C%2Fli%3E'
         27        ECHO                                                         ~19
    6    28      > JMP                                                          ->24
         29    >   FE_FREE                                                      $17
    9    30        ECHO                                                         '%3C%2Ful%3E%0D%0A'
    3    31      > JMP                                                          ->11
         32    >   FE_FREE                                                      $8
   10    33      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
216.41 ms | 2738 KiB | 15 Q