3v4l.org

run code in 300+ PHP versions simultaneously
<?php $labels = array("Element1", "Element2", "Element3", "Element4", "Element5","Element6"); $key = 1; foreach($labels as $value) { if($key%2) { echo $value.","; } else { echo $value.",</br>"; } $key++; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/WG5nP
function name:  (null)
number of ops:  15
compiled vars:  !0 = $labels, !1 = $key, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 1
    4     2      > FE_RESET_R                                       $5      !0, ->13
          3    > > FE_FETCH_R                                               $5, !2, ->13
    6     4    >   MOD                                              ~6      !1, 2
          5      > JMPZ                                                     ~6, ->9
    8     6    >   CONCAT                                           ~7      !2, '%2C'
          7        ECHO                                                     ~7
          8      > JMP                                                      ->11
   12     9    >   CONCAT                                           ~8      !2, '%2C%3C%2Fbr%3E'
         10        ECHO                                                     ~8
   14    11    >   PRE_INC                                                  !1
    4    12      > JMP                                                      ->3
         13    >   FE_FREE                                                  $5
   16    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.33 ms | 1394 KiB | 13 Q