3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [0, 1]; foreach ($arr as $k => &$v) { echo " [$k] => $v\n"; } $v = 5; var_dump($arr[1]);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 11
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/OmkEW
function name:  (null)
number of ops:  18
compiled vars:  !0 = $arr, !1 = $v, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1      > FE_RESET_RW                                      $4      !0, ->11
          2    > > FE_FETCH_RW                                      ~5      $4, !1, ->11
          3    >   ASSIGN                                                   !2, ~5
    6     4        ROPE_INIT                                     5  ~8      '+%5B'
          5        ROPE_ADD                                      1  ~8      ~8, !2
          6        ROPE_ADD                                      2  ~8      ~8, '%5D+%3D%3E+'
          7        ROPE_ADD                                      3  ~8      ~8, !1
          8        ROPE_END                                      4  ~7      ~8, '%0A'
          9        ECHO                                                     ~7
    5    10      > JMP                                                      ->2
         11    >   FE_FREE                                                  $4
    9    12        ASSIGN                                                   !1, 5
   11    13        INIT_FCALL                                               'var_dump'
         14        FETCH_DIM_R                                      ~12     !0, 1
         15        SEND_VAL                                                 ~12
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.7 ms | 1399 KiB | 15 Q