3v4l.org

run code in 300+ PHP versions simultaneously
<?php $labels = array("Element1","Element2","Element3","Element4","Element5","Element6"); $i = 1; $str = ''; foreach($labels AS $label) { $str += "$label, "; if ($i % 2 == 0) { $str += "\n"; } $i++; } //Remove last 2 chars $str = substr($str,0,(strlen($str)-2)); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 12
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/Krro7
function name:  (null)
number of ops:  24
compiled vars:  !0 = $labels, !1 = $i, !2 = $str, !3 = $label
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 1
    5     2        ASSIGN                                                   !2, ''
    6     3      > FE_RESET_R                                       $7      !0, ->14
          4    > > FE_FETCH_R                                               $7, !3, ->14
    8     5    >   NOP                                                      
          6        FAST_CONCAT                                      ~8      !3, '%2C+'
          7        ASSIGN_OP                                     1          !2, ~8
    9     8        MOD                                              ~10     !1, 2
          9        IS_EQUAL                                                 ~10, 0
         10      > JMPZ                                                     ~11, ->12
   11    11    >   ASSIGN_OP                                     1          !2, '%0A'
   13    12    >   PRE_INC                                                  !1
    6    13      > JMP                                                      ->4
         14    >   FE_FREE                                                  $7
   16    15        INIT_FCALL                                               'substr'
         16        SEND_VAR                                                 !2
         17        SEND_VAL                                                 0
         18        STRLEN                                           ~14     !2
         19        SUB                                              ~15     ~14, 2
         20        SEND_VAL                                                 ~15
         21        DO_ICALL                                         $16     
         22        ASSIGN                                                   !2, $16
   18    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.77 ms | 1395 KiB | 15 Q