3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1,2,3); $b = &$a; foreach($b as $i => $v) { echo "$i => $v\n"; /*if (isset($b[$i+1])) { $b[$i+1] += 1; }*/ unset($b[$i+1]); } var_dump($a, $b);
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
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/tbuZ4
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $b, !2 = $v, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN_REF                                               !1, !0
    5     2      > FE_RESET_R                                       $6      !1, ->13
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->13
          4    >   ASSIGN                                                   !3, ~7
    6     5        ROPE_INIT                                     4  ~10     !3
          6        ROPE_ADD                                      1  ~10     ~10, '+%3D%3E+'
          7        ROPE_ADD                                      2  ~10     ~10, !2
          8        ROPE_END                                      3  ~9      ~10, '%0A'
          9        ECHO                                                     ~9
   10    10        ADD                                              ~12     !3, 1
         11        UNSET_DIM                                                !1, ~12
    5    12      > JMP                                                      ->3
         13    >   FE_FREE                                                  $6
   13    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.94 ms | 1395 KiB | 15 Q