3v4l.org

run code in 300+ PHP versions simultaneously
<?php $info = array( 10 => 'apple', 8 => 'orange', 2 => 'banana', 23 => 'peach', ); $index = 0; $myGoal = array(); foreach($info as $amount => $friut){ $myGoal[$index] = [$amount => $friut]; $index++; } print_r($myGoal);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/0EXNd
function name:  (null)
number of ops:  16
compiled vars:  !0 = $info, !1 = $index, !2 = $myGoal, !3 = $friut, !4 = $amount
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, 0
   11     2        ASSIGN                                                   !2, <array>
   12     3      > FE_RESET_R                                       $8      !0, ->11
          4    > > FE_FETCH_R                                       ~9      $8, !3, ->11
          5    >   ASSIGN                                                   !4, ~9
   13     6        INIT_ARRAY                                       ~12     !3, !4
          7        ASSIGN_DIM                                               !2, !1
          8        OP_DATA                                                  ~12
   14     9        PRE_INC                                                  !1
   12    10      > JMP                                                      ->4
         11    >   FE_FREE                                                  $8
   17    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.81 ms | 1395 KiB | 15 Q