3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1,2,3); foreach($a as $i => $v) { echo "$i => $v\n"; if (isset($a[$i+1])) { $a[$i+1] += 1; } } var_dump($a);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 16
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 15
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/0BCmi
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $v, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $4      !0, ->16
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->16
          3    >   ASSIGN                                                   !2, ~5
    5     4        ROPE_INIT                                     4  ~8      !2
          5        ROPE_ADD                                      1  ~8      ~8, '+%3D%3E+'
          6        ROPE_ADD                                      2  ~8      ~8, !1
          7        ROPE_END                                      3  ~7      ~8, '%0A'
          8        ECHO                                                     ~7
    6     9        ADD                                              ~10     !2, 1
         10        ISSET_ISEMPTY_DIM_OBJ                         0          !0, ~10
         11      > JMPZ                                                     ~11, ->15
    7    12    >   ADD                                              ~12     !2, 1
         13        ASSIGN_DIM_OP                +=               1          !0, ~12
         14        OP_DATA                                                  1
    4    15    > > JMP                                                      ->2
         16    >   FE_FREE                                                  $4
   11    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.81 ms | 1399 KiB | 15 Q