3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array_fill(0, 1000, 5); $copy = array(); foreach( $array as $i => $foobar ) { $copy[$i+10] = $foobar; } foreach( $copy as $i => &$foobar ) { $array[$i-10] = $foobar = 10; } echo $array[0]; echo $copy[10];
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 14
2 jumps found. (Code = 125) Position 1 = 16, Position 2 = 23
Branch analysis from position: 16
2 jumps found. (Code = 126) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 14
filename:       /in/PUjjL
function name:  (null)
number of ops:  29
compiled vars:  !0 = $array, !1 = $copy, !2 = $foobar, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'array_fill'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 1000
          3        SEND_VAL                                                 5
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !0, $4
    3     6        ASSIGN                                                   !1, <array>
    4     7      > FE_RESET_R                                       $7      !0, ->14
          8    > > FE_FETCH_R                                       ~8      $7, !2, ->14
          9    >   ASSIGN                                                   !3, ~8
    6    10        ADD                                              ~10     !3, 10
         11        ASSIGN_DIM                                               !1, ~10
         12        OP_DATA                                                  !2
    4    13      > JMP                                                      ->8
         14    >   FE_FREE                                                  $7
    9    15      > FE_RESET_RW                                      $12     !1, ->23
         16    > > FE_FETCH_RW                                      ~13     $12, !2, ->23
         17    >   ASSIGN                                                   !3, ~13
   11    18        SUB                                              ~15     !3, 10
         19        ASSIGN                                           ~17     !2, 10
         20        ASSIGN_DIM                                               !0, ~15
         21        OP_DATA                                                  ~17
    9    22      > JMP                                                      ->16
         23    >   FE_FREE                                                  $12
   14    24        FETCH_DIM_R                                      ~18     !0, 0
         25        ECHO                                                     ~18
   15    26        FETCH_DIM_R                                      ~19     !1, 10
         27        ECHO                                                     ~19
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.09 ms | 1396 KiB | 15 Q