3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
10.88 ms | 407 KiB | 7 Q