3v4l.org

run code in 300+ PHP versions simultaneously
<?php $counter = 1; $array = [1,2,3,4,5]; echo 'startnewrow' . "\n"; foreach($array as $a) { echo 'start col' . "\n"; echo 'content' . "\n"; echo 'endcol' . "\n"; if($counter % 2 === 0) { echo 'endrow' . "\n"; echo 'startnewrow' . "\n"; } $counter++; } echo 'endrow' . "\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 13
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/qJoXa
function name:  (null)
number of ops:  18
compiled vars:  !0 = $counter, !1 = $array, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
    4     1        ASSIGN                                                   !1, <array>
    5     2        ECHO                                                     'startnewrow%0A'
    6     3      > FE_RESET_R                                       $5      !1, ->15
          4    > > FE_FETCH_R                                               $5, !2, ->15
    7     5    >   ECHO                                                     'start+col%0A'
    8     6        ECHO                                                     'content%0A'
    9     7        ECHO                                                     'endcol%0A'
   10     8        MOD                                              ~6      !0, 2
          9        IS_IDENTICAL                                             ~6, 0
         10      > JMPZ                                                     ~7, ->13
   11    11    >   ECHO                                                     'endrow%0A'
   12    12        ECHO                                                     'startnewrow%0A'
   14    13    >   PRE_INC                                                  !0
    6    14      > JMP                                                      ->4
         15    >   FE_FREE                                                  $5
   16    16        ECHO                                                     'endrow%0A'
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.67 ms | 1393 KiB | 13 Q