3v4l.org

run code in 300+ PHP versions simultaneously
<? $arData = array( 0 => '5', 1 => '26', 2 => '6', 3 => '27' ); $arResult = array(); foreach ($arData as $key => $arValue) { $arResult[intval($key/2)][key($arValue)] = $arValue[key($arValue)]; } print_r($arResult); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/s4048
function name:  (null)
number of ops:  23
compiled vars:  !0 = $arData, !1 = $arResult, !2 = $arValue, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
    9     2      > FE_RESET_R                                       $6      !0, ->18
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->18
          4    >   ASSIGN                                                   !3, ~7
   10     5        DIV                                              ~9      !3, 2
          6        CAST                                          4  ~10     ~9
          7        INIT_FCALL                                               'key'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $12     
         10        INIT_FCALL                                               'key'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $14     
         13        FETCH_DIM_R                                      ~15     !2, $14
         14        FETCH_DIM_W                                      $11     !1, ~10
         15        ASSIGN_DIM                                               $11, $12
         16        OP_DATA                                                  ~15
    9    17      > JMP                                                      ->3
         18    >   FE_FREE                                                  $6
   13    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
   15    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.47 ms | 1387 KiB | 17 Q