3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.01 ms | 1395 KiB | 17 Q