3v4l.org

run code in 300+ PHP versions simultaneously
<?php $elements = [1,2,3,4,5]; foreach ($elements as $k => &$item) { //.... } $another = [1,2,3,4,5]; foreach ($another as $k => $item) { $item++; } var_dump($elements);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
Branch analysis from position: 5
filename:       /in/ndpr0
function name:  (null)
number of ops:  17
compiled vars:  !0 = $elements, !1 = $item, !2 = $k, !3 = $another
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1      > FE_RESET_RW                                      $5      !0, ->5
          2    > > FE_FETCH_RW                                      ~6      $5, !1, ->5
          3    >   ASSIGN                                                   !2, ~6
          4      > JMP                                                      ->2
          5    >   FE_FREE                                                  $5
    9     6        ASSIGN                                                   !3, <array>
   10     7      > FE_RESET_R                                       $9      !3, ->12
          8    > > FE_FETCH_R                                       ~10     $9, !1, ->12
          9    >   ASSIGN                                                   !2, ~10
   11    10        PRE_INC                                                  !1
   10    11      > JMP                                                      ->8
         12    >   FE_FREE                                                  $9
   14    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.48 ms | 1399 KiB | 15 Q