3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 0 => 'string1', 2 => 'string2', 4 => 'string3', 5 => 'string4'); $arrays =$array; print_r($array); $array=array(); $i=32; foreach($arrays as $k => $item) { $array[$i]=$item; unset($arrays[$k]); $i++; } print_r($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/AD66f
function name:  (null)
number of ops:  20
compiled vars:  !0 = $array, !1 = $arrays, !2 = $i, !3 = $item, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, !0
    5     2        INIT_FCALL                                               'print_r'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    6     5        ASSIGN                                                   !0, <array>
    7     6        ASSIGN                                                   !2, 32
    8     7      > FE_RESET_R                                       $10     !1, ->15
          8    > > FE_FETCH_R                                       ~11     $10, !3, ->15
          9    >   ASSIGN                                                   !4, ~11
   10    10        ASSIGN_DIM                                               !0, !2
         11        OP_DATA                                                  !3
   11    12        UNSET_DIM                                                !1, !4
   12    13        PRE_INC                                                  !2
    8    14      > JMP                                                      ->8
         15    >   FE_FREE                                                  $10
   16    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.69 ms | 1395 KiB | 15 Q