3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = Array ( 0 => Array ('id' => 1, 'check' => ''), 1 => Array ('id' => 2, 'check' => ''), 2 => Array ('id' => 3, 'check' => 'on'), 3 => Array ('id' => 4, 'check' => ''), 4 => Array ('id' => 5, 'check' => ''), ); $i=0; foreach ($data as $value) { if (($i % 2) === 0) { echo "<div class='row'>"; } echo '<span>'.$value['id'].'</span>'; if (($i % 2) === 1) { echo "</div>"; } $i++;}
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
Branch analysis from position: 8
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/GPQKc
function name:  (null)
number of ops:  20
compiled vars:  !0 = $data, !1 = $i, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, 0
   12     2      > FE_RESET_R                                       $5      !0, ->18
          3    > > FE_FETCH_R                                               $5, !2, ->18
   13     4    >   MOD                                              ~6      !1, 2
          5        IS_IDENTICAL                                             ~6, 0
          6      > JMPZ                                                     ~7, ->8
          7    >   ECHO                                                     '%3Cdiv+class%3D%27row%27%3E'
   14     8    >   FETCH_DIM_R                                      ~8      !2, 'id'
          9        CONCAT                                           ~9      '%3Cspan%3E', ~8
         10        CONCAT                                           ~10     ~9, '%3C%2Fspan%3E'
         11        ECHO                                                     ~10
   15    12        MOD                                              ~11     !1, 2
         13        IS_IDENTICAL                                             ~11, 1
         14      > JMPZ                                                     ~12, ->16
         15    >   ECHO                                                     '%3C%2Fdiv%3E'
   16    16    >   PRE_INC                                                  !1
   12    17      > JMP                                                      ->3
         18    >   FE_FREE                                                  $5
   16    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
127.19 ms | 1398 KiB | 13 Q